Play the Atari 2600 with a laser gun!
How It Works
A Jetson Xavier NX is running the game Atlantis
on the Stella Atari 2600 emulator. A projector is displaying the game on a wall.
A camera connected to the Jetson is continually capturing images of the game screen. A thresholding algorithm implemented in OpenCV searches out the red dot of a laser pointer.
A toy gun modified to "shoot" a laser beam is pointed at the game screen. An algorithm implemented in Python matches the coordinates of the detected laser dot with coordinates in the field of game play. When coordinates are within a certain range, actions within the game are carried out by simulating sequences of key presses on the keyboard with the pynput
Python module.
Media
YouTube:
Bill of Materials
- 1 x NVIDIA Jetson Xavier NX
- 1 x Raspberry Pi Camera v2
- 1 x CSI cable
- 1 x Projector
- 1 x Red laser diode
- 1 x Push button
- 1 x 4.5V battery pack
- 1 x Toy gun
- Miscellaneous wires
About the Author
I really like this, wrote it up for the blog. Just occurred to me that the challenge level could be increased a bit by limiting the number of laser shots -- say, five shots and then a three-second pause. That would prevent spamming the trigger.
Just a thought. Looks like fun just as it is!