Saturday, June 21, 2014

GPIO 01-leds

This is my first post regarding Raspberry's GPIO pins. This is very basic scheme consisting of ten LEDs, which are controlled by python script, providing several effects for LEDs.

You can find the python script (01-leds.py) on github in GPIO repo.
LEDs are connected as follows:
GPIO Layout

 #define GPIO ports
    LEDr1 = 22
    LEDr2 = 17
    LEDr3 = 18
    LEDo1 = 23
    LEDo2 = 24
    LEDy1 = 25
    LEDy2 = 10
    LEDg1 = 4
    LEDg2 = 9
    LEDg3 = 11
where the number represents GPIO pin with the same number.
r=red
o=orange
y=yellow
g=green

Script provides several snake-based effects.

Run it with -h option to show help.
Sample usage:
# ./01-leds.py -i 10 -o 0.2 -b 0.1
01-leds: 10 LEDs connected to RPi

No comments:

Post a Comment