Paul Frappollo
Published

Game Box Coin Controller

This is a spoof on old arcade game machines that would cost coins to play and instead uses coins to control the game itself.

AdvancedFull instructions provided254
Game Box Coin Controller

Things used in this project

Hardware components

Circuit Playground Express
Adafruit Circuit Playground Express
×1
USB-A to Mini-USB Cable
USB-A to Mini-USB Cable
×1

Software apps and online services

Adafruit CircuitPython

Hand tools and fabrication machines

Scissor, Electrician
Scissor, Electrician
Conductive Tape, Copper Foil
Conductive Tape, Copper Foil
Quarters
Spray Paint (Optional)
Gorilla Glue

Story

Read more

Code

main.py

Python
from adafruit_circuitplayground.express import cpx
from adafruit_hid.keyboard import Keyboard
import usb_hid
from adafruit_hid.keycode import Keycode
import board

kbd = Keyboard(usb_hid.devices)

while True:

    if cpx.touch_A4:
        print('Touched A4!')
        kbd.press(Keycode.W)

    elif cpx.touch_A5:
        print('Touched A5!')
        kbd.press(Keycode.A)

    elif cpx.touch_A6:
        print('Touched A6!')
        kbd.press(Keycode.S)

    elif cpx.touch_A7:
        print('Touched A7!')
        kbd.press(Keycode.D)

    elif cpx.touch_A1:
        print('Touched A1!')
        kbd.press(Keycode.K)

    elif cpx.touch_A2:
        print('Touched A2!')
        kbd.press(Keycode.J)

    else:
        kbd.release_all()

Credits

Paul Frappollo
4 projects • 0 followers
Contact

Comments

Please log in or sign up to comment.