
Chapter 5: Common Procedures
Reading the MODE Button
600034-01A
SNAP Connect E10 User Guide
Page 33
Reading the
MODE
Button
The
MODE
button on the wireless end of the E10 is connected to the Linux processor.
One way it can be monitored is via
:/dev/event0
.
Here is example hexdump output:
Figure 5-1: Mode Button Output
A simpler way to read the
MODE
button is to use the
gpio9260
program that comes with
the E10:
/usr/bin/gpio9260 ?PB10
This program will return
0
if the button is pressed, and will return a non-zero value if the
button is not pressed.
Assuming you have not changed the default
UserMain.py
file, the button can also be read
via SNAP RPC by calling function
readButton()
.
The first two lines were output when
the
MODE
button was pressed.
The last two lines were output when
the
MODE
button was released.
Notice the values in this
column on lines 1 and 3.