Monday, June 23, 2014

GPIO 02-leds

This is a slightly modified 01-leds python script. It can turn on/off group of LEDs (all red, green or yellow) defined in the LEDret(color) function.
This post shows scheme of how the LEDs are connected to GPIO.


The script is in my git hub GPIO repository.

LEDs are connected as follows:


Usage is very simple, you can call this script with options:
    -r NR   --red=NR
    -y NR   --yellow=NR
    -g NR   --green=NR
where NR is 1 (LEDs on) or 0 (LEDs off)

Example:
./02-leds.py -y 1 -g 1 (this will turn on all green and yellow LEDs)
NOTE: orage LEDs are in group with yellow one's, see 02-leds.py for more details.

No comments:

Post a Comment