Introducing the RPi gem

The 1st Raspberry PI GPIO project most people start with is to set an LED on or off. This gem simply allows you to set the state of multiple LEDs (either on, off, or blink).

Example

rpi=RPinew%w()# <-- each pin connects to an LEDrpiled1onsleep2rpiled1offrpiled2blinksleep4rpiled2stop

Note: The blink value can be changed from the default 0.5 seconds to blink more often (e.g. 0.2) or less often (e.g. 1.5).

Resources

Tags:
Source:
2031hrs.txt
Published:
24-11-2013 20:31