LeMaker Guitar:On-board LEDs

From BananaPro/Pi
Jump to: navigation, search

Other languages:
English • ‎中文(简体)‎

Description

The LeMaker Guitar provided the sysfs file system interface, so we can use it to control the on-board LEDs(blue & green).

Operations

See the interfances

Change directory to /sys/class/leds and you will see two dir:
Ctrl led1.png
This shows that we can contral blue and green LED.
Now I control the green LED for example:

View the supported triggers

cat trigger

Ctrl led2.png

Close the trigger

echo none > trigger

Ctrl led3.png
Now, the green LED stopped flanhing.
NOTE: Must close the trigger before contral the LED.

Close the LED

echo 0 > brightness

Open the LED

echo 1 > brightness

Result

It is the same way to contral the blue LED.
The pic blow shows that I closed the green LED and opened the blue LED:
Ctrl led4.jpg

NOTE

In this(V1601) version, you should
wright echo 0 > green:GPIOB12/brightness to light the green LED and
wright echo 1 > blue:GPIOB31/brightness to light the blue LED.

We will fix the problem in next version.