Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

How to handle the gpio-LED

1,799 bytes added, 17:03, 28 August 2012
m
IGEP COM MODULE Board
Now the selected led is configured with a timer consisting of 250 miliseconds ON and 750 miliseconds OFF.
<section end=IGEP_COM_MODULE />
 
= IGEP COM PROTON Board =
<section begin=IGEP_COM_PROTON />
''' Basic '''
 
Log into IGEP COM MODULE (for example via SSH, as shown in the previous chapter), and run the following commands to turn LED's on:
 
<pre>echo 1 > /sys/devices/platform/leds-gpio/leds/d242\:green/brightness
echo 1 > /sys/devices/platform/leds-gpio/leds/d441\:green/brightness
echo 1 > /sys/devices/platform/leds-gpio/leds/d442\:green/brightness</pre>
 
You can turn them down using the same command and write '0' instead of '1'.
 
 
''' Know more '''
 
IGEP COM PROTON LED's are controlled with it's platform device at /sys/devices/platform/leds-gpio/leds/
 
If you want to trigger the leds you can enable this mode and select the trigger source (none by default) to: mmc0, mmc1, timer, heartbeat and default-on.<br>
 
To enable any of this modes you just have to change a parameter in the directory of the led you want to control. You can see all the possibilities using the instruction 'cat':<br>
 
<pre>$ cat /sys/devices/platform/leds-gpio/leds/d242\:green/trigger
 
[none] mmc0 mmc1 timer heartbeat default-on
</pre>
 
In the example above, we have checked the status of the trigger in led d242:green. Mode 'none' is selected.
 
To change it, for example, to the ''timer'' mode you can use 'echo':
 
<pre>echo timer &gt; /sys/devices/platform/leds-gpio/leds/d242\:green/trigger
</pre>
 
In this case, we have set the trigger to the 'timer' mode. Now you can set the time for what the led is ON and the time it is OFF using:
 
<pre>echo 250 &gt; /sys/devices/platform/leds-gpio/leds/d242\:green/delay_on
echo 750 &gt; /sys/devices/platform/leds-gpio/leds/d242\:green/delay_off
</pre>
 
Now the selected led is configured with a timer consisting of 250 miliseconds ON and 750 miliseconds OFF.
<section end=IGEP_COM_PROTON />
4,199
edits