Add GPIO Zero code example to piliter

This commit is contained in:
Ben Nuttall 2016-10-17 22:48:41 +01:00
parent 692c174572
commit 032f7a49ec
1 changed files with 20 additions and 2 deletions

View File

@ -6,7 +6,7 @@ type: led
formfactor: Custom
manufacturer: Ciseco
description: An 8 LED strip for the Raspberry Pi
url: http://www.averagemanvsraspberrypi.com/2014/04/how-to-use-pi-liter-from-ciseco.html
url: http://gpiozero.readthedocs.io/en/v1.3.1/api_boards.html#piliter
buy: http://cpc.farnell.com/wirelessthings/pi-liter/pi-lite-junior-led-io-board-for/dp/SC13293
image: 'pi-liter.png'
pincount: 26
@ -63,4 +63,22 @@ Applications:
* Bar graph
* Light chaser
* Activity indicator
* Lighting effects
* Lighting effects
## Code
```python
from gpiozero import PiLiter
from time import sleep
lite = PiLiter()
for led in lite:
led.on()
sleep(0.1)
lite.on()
sleep(5)
```
[GPIO Zero docs](http://gpiozero.readthedocs.io/en/v1.3.1/api_boards.html#piliter)