evive has an inbuilt 5-way navigation key, which is used to navigate through evive menu based system. The navigational key has 4 directions:
This information is provided by the analog pin A11.
The 5th direction is centre-press. The centre switch is connected to the digital pin 19 in active HIGH mode. This means that if the switch is pressed, then pin 19 is HIGH; otherwise the pin is LOW.
The table below shows the values for their corresponding directions:
|DIRECTION||ANALOG VALUE RANGE|
In this example we will read the state of the 5-way navigation key and display it on the TFT Screen.
Below is the Arduino sketch: