Hello :)
I hope this is not the wrong forum. ???
I've made a little library for using various Gamepads with Arduino boards (
Atmega untested). At the moment the following gamepads are supported:
| ATARI | | SEGA | | NINTENDO | | MISC |
| 7800 1 button Mode | | Master System Control Pad | | NES Gamepad | | Generic 2 Button Gamepad |
| 7800 2 button Mode | | Genesis 3 button Controller | | SNES Gamepad | | - |
| 7800 2 button Mode | | Genesis 6 button Controller | | SNES Mouse | | - |
The library can be found on
GitHub (https://github.com/sheegt/ArduinoGamepadLibrary). There you can also find a detailed readme and an API-description.
I also created some examples for it.
Example 1: SNES Gamepad as USB mouse (https://github.com/sheegt/ArduinoGamepadLibrary/tree/master/examples/GamepadSnesUSBMouse)
With this sketch you can use yor SNES Gamepad as an USB mouse. It uses the USB-HID functionality of an Arduino Leonardo or Micro to convert the recorded button states into mouse movements and mouse clicks.
| Button | | Description |
| START | | Enable mouse |
| D-Pad | | Moving the cursor |
| B | | Left mouse mutton |
| A | | Right mouse button |
| SELECT | | Reset sensivitiy |
| Y | | Sensitivtiy - 1 |
| X | | Sensitivtiy + 1 |
| R | | Acceleration |
| L | | Middle mouse button |
Example 2: Use the supported Gamepads as an USB Gamepad: (https://github.com/sheegt/ArduinoGamepadLibrary/tree/master/examples/GamepadUsbControlPanel)
The procedure is easy. My library reads, accordingly to the chosen GamepadLayout, the button states of the connected Gamepads and submits those values to the JoyStickLibrary (https://github.com/MHeironimus/ArduinoJoystickLibrary), which uses the USB-HID-functionalty of the Arduino Leonardo / Micro to emulate an USB-Gamepad.
In the sub-folder 'GamepadUsbControlPanel' you can find the 'Arduino Gamepad ControlPanel.exe', which can be used to switch between the GamepadLayouts without the need to alter and re-upload the code. The GUI looks like
this (http://i.imgur.com/FLqESWu.png).
The SNES Mouse is not fully implemented in this mode. Maybe it's useful to some of you.