
Chapter 5: Common Procedures
Controlling the A LED
600034-01A
SNAP Connect E10 User Guide
Page 32
Controlling
the A LED
The
A
LED on the wireless end of the E10 is controlled by the internal SNAP Engine using
GPIO pins GPIO_0 and GPIO_1. This LED is actually a tri-color LED, controlled as
follows:
GPIO_0 controls the
green
of the LED (0 is off, 1 is green).
GPIO_1 controls the
red
of the LED (0 is off, 1 is red).
If you turn on both GPIO_0 and GPIO_1, the LED will be
amber
(red + green)
As shipped, the internal SNAP Engine is loaded with a script that lights the LED up green.
It also provides the following functions that can be invoked (via RPC) over the air:
setLedAOff()
setLedAGreen()
setLedARed()
setLedAYellow()
Controlling
the B LED
The
B
LED on the wired end of the E10 is controlled by the Linux processor.
Try the following commands from the Linux command line:
echo “1” > /sys/class/leds/greenled/brightness
echo “0” > /sys/class/leds/greenled/brightness
echo “1” > /sys/class/leds/redled/brightness
echo “0” > /sys/class/leds/redled/brightness
Like the
A
LED, turning on both
red
and
green
for LED
B
will create an
amber
color.
Assuming you have not changed the
UserMain.py
file that comes preloaded on the E10,
you can control the
B
LED over the air too:
setLedBOff()
setLedBGreen()
setLedBRed()
setLedBYellow()
To see how this works, look in the file
UserMain.py
.