Arduino Arcade RetroPi PC light gun - With source code!

Channel:
Subscribers:
444
Published on ● Video Link: https://www.youtube.com/watch?v=G9bOAZY1ogk



Duration: 1:46
851 views
20


Tell me this isn't the coolest thing ever!

Childhood dream come true, playing shooting games from the arcade at home. BLAM!

Parts used:
- Old laser tag gun
- Arduino pro micro
- Gyro+accelerometer
- Mini-joystick
- Rotary encoder
- OLED screen
- 3 buttons
- 2 switches
- Lots of code

My source code is free for personal use: https://github.com/Domush/Arduino-Arcade-PC-light-gun


For those interesting in trying their hand at this, I finished the code last night and it's ready for prime time, even if you can't code at all.

This means the code is complete and should work for anyone. Just take careful note of the pin assignments and adjust accordingly.

Added mini-joystick support for movement and zoom (aiming down sights). I feel like it would be limiting if you have to use a secondary controller/keyboard for movement, but it's your call if you want to use it.

All options are just that, optional. If you don't add a joystick or encoder or buttons they'll just be ignored. No need to disable them in the code.

This code can easily be used as a simple hover-mouse if you wish, with zero required code changes.

Assignments:
[Trigger] : Left mouse
[Alt] : Middle mouse
[Reload] : Presses 'r' key
[Joystick button] : Right mouse
[Encoder button] :
(press) Switch between X and Y gyro sensitivity adjustment
(hold) Hold cursor - used to adjust gun aim
[Encoder + Alt] : Re-calibrate gyro
[Encoder] : increase/decrease gyro sensitivity on a per-axis basis (press encoder button to switch axes)
[Joystick] : WASD keys
[Left/Right tilt] : Presses PgUp/PgDn keys (designed to be used for leaning in games which support it)