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.