- The Arduino detects joystick movement.
- When it does, the Arduino sends a serial message telling which direction. It does this at 9600 bps (baud per second).
- The website listens to the serial port via
- It breaks down what message was sent
- An if statement decides where and how much to move the box on-screen.
Follow the instructions on the website to connect everything. I’ve only tested this with an UNO R3, so you might have to modify some stuff if using it with a different board.
I would host it too but it’s such a simple little program that you can just fork it and it works on replit.dev.
Overall I think this is extremely cool and opens up potential for a website that sets off an alarm. I mean, think about that. A horror game with this! Yeah. Adapt this however you want if you have an Arduino.