5 Way Navigation Button connected to an Arduino or STM32F103C8T6

A 5 way navigation button actually has 7 different navigational settings. It has a lot of functionality in a small package.  The ‘button’ on it can be moved/pushed in 4 directions ( labeled up, down, left, right)  or pressed down. There are also two other switched buttons labeled ‘Set’ and ‘Reset’ for a total of 7 functions. Quite handy!

Here is what it looks like:

5 Way Navigation Button

COM is wired to ground. Each of the other navigation pins are wired to a pin on the STM32F103C8T6 or Arduino . Here is what the wiring looks like when it is wired to an STM32F103C8T6.

STM32F103C8T6 with a 5 Way Navigation Button Here is the Arduino IDE code for the STM32F103C8T6. When the button is moved or pressed it will light the LED and display the action on the serial console. Note that the input pin is initially configured as INPUT_PULLUP which makes the pin HIGH. When the button is pushed/moved it will make the  corresponding pin go to ground (LOW).

Here is the code for an Arduino Uno using Digital Pins (2,3,4,5,6,7,8):

Here is a top and side view of the button so you can see it looks somewhat like a joystick.

5 Way Navigation Button5 Way Navigation Button

Leave a Reply

Your email address will not be published.