Set the hardware clock in Coordinated Universal Time (UTC).
Confirm that the hardware clock has been set correctly in UTC.
Figure 5.48. Setting the Hardware Clock
5.6. User Switches
The device driver of the Armadillo-IoT user switches is implemented as an input device. Push and release events of the
user switches can be obtained from the device file of the input device.
The input device file of the user switches and the event code corresponding to each switch are shown below.
Table 5.10. Input Device Files and Event Codes
User Switches
Input Device File
Event Code
SW1
/dev/input/event1
2 (KEY_1)
SW2
3 (KEY_2)
SW3
4 (KEY_3)
Input devices are indexed in the order in which they are detected. If an input device
has been added by connecting a USB device etc., the index of the device file may
be different.
5.6.1. Confirming Events
Here the
evtest
command is used to check the push and release events of the user switch. To stop evtest, enter Ctrl+c.
[armadillo ~]# evtest /dev/input/event1
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "gpio-keys"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 2 (KEY_1)
Event code 3 (KEY_2)
Event code 4 (KEY_3)
Properties:
Testing ... (interrupt to exit)
Event: time 1458887649.091957, type 1 (EV_KEY), code 3 (KEY_2), value 1
Event: time 1458887649.091957, -------------- EV_SYN ------------
Event: time 1458887650.311954, type 1 (EV_KEY), code 3 (KEY_2), value 0
Event: time 1458887650.311954, -------------- EV_SYN ------------
:
[armadillo ~]#
Displayed when a SW2 button push event is detected.
Displayed when a SW2 button release event is detected.
Figure 5.49. User Switch: Event Confirmation
Armadillo-IoT Gateway G3Product Manual - INTL
Operational Checks
76