Skip to content

Commit

Permalink
Merge branch 'master' of github.com:RPi-Distro/python-gpiozero
Browse files Browse the repository at this point in the history
  • Loading branch information
waveform80 committed Nov 16, 2015
2 parents 68b80ef + 213dc4b commit 3482219
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,34 @@ The latest release is 1.0 released on 16th November 2015.
About
=====

With very little code, you can quickly get going connecting your physical
components together::
Component interfaces are provided to allow a frictionless way to get started
with physical computing::

from gpiozero import LED
from time import sleep

led = LED(2)

while True:
led.on()
sleep(1)
led.off()
sleep(1)

With very little code, you can quickly get going connecting your components
together::

from gpiozero import LED, Button
from signal import pause

led = LED(2)
button = Button(3)

button.when_pressed = led.on
button.when_released = led.off

pause()

The library includes interfaces to many simple everyday components, as well as
some more complex things like sensors, analogue-to-digital converters, full
colour LEDs, robotics kits and more.
Expand Down

0 comments on commit 3482219

Please sign in to comment.