Difference between revisions of "What can I do with IGEP COM MODULE"
From IGEP - ISEE Wiki
m (→Handle the gpio-LED's) |
m (→Handle the gpio-LED's) |
||
Line 21: | Line 21: | ||
{{#lst:How to handle the gpio-LED|IGEP_COM_MODULE}} | {{#lst:How to handle the gpio-LED|IGEP_COM_MODULE}} | ||
− | ''From [[How to handle the gpio-LED]] | + | ''From [[How to handle the gpio-LED]]'' |
{{Table/IGEP Technology Devices | {{Table/IGEP Technology Devices | ||
|Tech_Family={{#lst:Template:Links|IGEP_COM_MODULE_Tech_Family}} | |Tech_Family={{#lst:Template:Links|IGEP_COM_MODULE_Tech_Family}} |
Revision as of 19:10, 5 September 2012
|
|
Overview
This is the 2/3 chapter of IGEP COM MODULE Tutorial Guide.
We will learn some basic tasks.
What can I do
Handle the gpio-LED's
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:
echo 1 > /sys/devices/platform/leds-gpio/leds/d210\:green/brightness echo 1 > /sys/devices/platform/leds-gpio/leds/d210\:red/brightness echo 1 > /sys/devices/platform/leds-gpio/leds/d440\:green/brightness echo 1 > /sys/devices/platform/leds-gpio/leds/d440\:red/brightness
You can turn them down using the same command and write '0' instead of '1'.
Know more
IGEP COM MODULE 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.
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':
$ cat /sys/devices/platform/leds-gpio/leds/d210\:green/trigger [none] mmc0 mmc1 timer heartbeat default-on
In the example above, we have checked the status of the trigger in led D210:green. Mode 'none' is selected.
To change it, for example, to the timer mode you can use 'echo':
echo timer > /sys/devices/platform/leds-gpio/leds/d210\:green/trigger
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:
echo 250 > /sys/devices/platform/leds-gpio/leds/d210\:green/delay_on echo 750 > /sys/devices/platform/leds-gpio/leds/d210\:green/delay_off
Now the selected led is configured with a timer consisting of 250 miliseconds ON and 750 miliseconds OFF.
From How to handle the gpio-LED
|
|