Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Rock/LED"

(Created page with "The RR has 3 leds, red, green, blue. All can be programmable. Below is a small script to flash the green led on RR. <pre> #!/bin/sh # enable the gpio 172 -> green led echo ...")
 
Line 1: Line 1:
The RR has 3 leds, red, green, blue. All can be programmable.
+
The RR has 3 leds, green(172), blue(174), red(175). All can be programmable.
  
 
Below is a small script to flash the green led on RR.
 
Below is a small script to flash the green led on RR.

Revision as of 09:43, 30 March 2014

The RR has 3 leds, green(172), blue(174), red(175). All can be programmable.

Below is a small script to flash the green led on RR.

#!/bin/sh

# enable the gpio 172 -> green led
echo 172 > /sys/class/gpio/export

# set the direction to output
echo "out" > /sys/class/gpio/gpio172/direction
while true;
do
echo 0 > /sys/class/gpio/gpio172/value #led on
sleep 1
echo 1 > /sys/class/gpio/gpio172/value #led off
sleep 1
done