Keysight U3810 Series Getting Started Guide
52
Test the U3810A GPIO Using Buttons and a Relay.
In this section will examine the GPIO functions of the BeagleBone. First, run a program to test out the
buttons on BeagleBone. Next, you are going to power up the relay circuit and run another program to
control the relay circuit by turning on and off using the button on the BeagleBone.
1
Run the
./ButtonTest
command to run the Button Test code.
NOTE
If the file does not exist, enter the following command to recompile the code.
gcc M1_L1_ButtonTest.c -l mraa -o ButtonTest
NOTE
The program will run and if the I
2
C bus is missing or the display is not detected on the bus and
error message will appear.
2
Press each one of the buttons and verify the display shows which button is “on”.
3
Try to press multiple buttons and all the buttons that are pressed should show. When the
ButtonTest code is executed, the LCD will display the B1, B2, B3 or B4 buttons depending on
which is pressed.
4
Press
Ctrl + C
in the PuTTY window to stop the Button Test program.
Next, you will control a relay using buttons. To do this, the relay will need +5V, ground, and a control
signal. The GP2 on
J9 Pin 3 (2)
will provide the control signal. When this signal is asserted low, the
relay will turn on.
Содержание U3810A
Страница 1: ...Keysight U3810A Advanced IoT Teaching Solution Getting Started Guide ...
Страница 78: ...Keysight U3810 Series Getting Started Guide 78 IMU Characteristics from the LSM9DS1 datasheet ...
Страница 131: ...Keysight U3810 Series Getting Started Guide 131 ...
Страница 132: ...Keysight U3810 Series Getting Started Guide 132 Disassembly ...