Contest 2013/2014
Contest 2011
Contest 2009
Contest 2008
PrimerJoystick 1.0
This project turns the STM32 Primer into a joystick that uses the MEMS for the X and Y axis and the orange button for the joytick button 1.

Code size:6.5K Author:rtburke
Source files included:yes Version:1.0
Use circleOS:yes (circleOSversion) Creation date:2008-02-14 14:50:27
Hardware modification:no Modification date:2008-02-14 14:50:27
Based on the STM32 Primer:Primer1
Downloads:2303 Views:26406
Average ratings:2.97/5 (996 rates)

Download: (64 KB)


See the readme.txt file for complete information.

This project is almost a copy of the PrimerMouse project which is in turn derived from the ST example "JoystickMouse" provided with the ST USBLib. The ST USBLib uses a small joystick on the development board to generate mouse movement. This project uses the MEMS information to provide the X and Y direction for a joystick. The STM32 Primer button is mapped to button 1.

There is no way to connect/disconnect the USB cable using software only (an external transistor is used for this purpose on the ST demo board for the original JoystickMouse example). Therefore the STM32 Primer must be disconnected then reconnected to detect the joystick. 
The application is designed such that if the STM32 Primer is not connected to the PC's USB port and the button is pressed, it will exit the application. If connected to the PC's USB port it behaves as button 1 on the joystick. This modification could also be included in the PrimerMouse example.

Assuming that you have Windows XP, to prove that the application is working, start the application and plug the USB cable into the socket labelled STM32 (near the button). Start Control Panel and select Game Controllers. You should see a controller labelled STM32 Joystick.

If you click the Properties tab you should see the joystick position and be able to test the button. You can also calibrate by selecting the settings tab and clicking calibrate.