You have unsaved changes. If you choose to leave all changes will be discarded.
Author: Andrew Hazelden
Last Updated: 2014-08-24
Category: Gaming and Fun
Downloaded: 378 times
Followed by: 2 users
The python based thumbstick.py demo allows you to read a MikroElektronika Thumbstick Click board on a Raspberry PI using the GPIO and SPI inputs via a Pi Click Shield. The Thumbstick Click board uses an SPI based MCP3204 module for reading the joystick axes and the joystick "center click" button is read using the GPIO input 17 on the Raspberry Pi.
Do you want to subscribe in order to receive notifications regarding "ACH Thumbstick Click RPi Demo" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "ACH Thumbstick Click RPi Demo" changes.
Do you want to report abuse regarding "ACH Thumbstick Click RPi Demo".
|DOWNLOAD LINK||RELATED COMPILER||CONTAINS|
|1408909305_ach_thumbstick_c_other_arm.zip [1.31MB]||Other ARM Compilers||
The Thumbstick Click board is connected to a Raspberry Pi using the MikroE Pi Click Shield. This shield connects to the Raspberry PI GPIO header pins and lets you attach MikroBus format (http://www.mikroe.com/mikrobus/) Click boards.View full image
The Thumbstick Click board uses an SPI based MCP3204 module for reading the joystick axes. The ADC0 channel is used for the y-axis and the ADC1 channel is used for the x-axis. The board is powered on 3.3 Volts from the GPIO header on the Raspberry PI.View full image
The joystick "center click" button is read using the GPIO input 17 on the Raspberry Pi and has an inverted logic state where the button clicked=0, and the button unclicked=1. If you take the rubber joystick cap off the thumbstick you can seeView full image
Run the thumbstick.py demo script using " sudo python thumbstick.py". If the script runs correctly you will be presented with the following output in the terminalView full image
You can use the webiopi webGUI to read the current GPIO pin state from a web browser. This is interesting as you can see the input and output mapping and see the binary state of each of the GPIO pins.View full image
You can also watch the live values on the Thumbstick's 2 ADC channels (Joystick X & Y Axis) using the webiopi "Device Monitor" webpage.View full image