This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Read Joystick and Push Button - display result to serial monitor | |
Tested with the Texas Instruments MSP540F5529LP LaunchPad using Energia | |
and an Addicore joystick with push button: | |
https://www.addicore.com/Dual-Axis-XY-Joystick-Module-with-Push-Button-p/139.htm | |
Note: The pin connections shown below will work with most MSP430 LaunchPads. | |
The maximum values of xValue and yValue will depend on the Analog Digital | |
Converter (ADC) - e.g. the F5529 is 12 bit (0 to 4095) while the 430G2 | |
is 10 bit (0 to 1023). |