This week I am making a physical wifi-enabled controller for an online game called Ball Drop. I will be using an Arduino-Nano-IoT-33 for this since it has an already built-in wifi shield. To actually play the game, I will be using a 4-way joystick to control the game, and one push button with a built-in LED as the connect/disconnect button and an indicator light.
The indicator light will show one of four states:
1. Off – This means that the controller is off.
2. Slow blink – This means that the controller is on, but is not connected to WiFi.
3. Fast blink – This means that the controller is connected to WiFi, but not connected to the game server.
4. On – This means that the controller is connected to the game.
The connect/disconnect button will be used to connect and disconnect to the game server.
During the creation of this controller, I borrowed heavily from the WiFi Nina example code. The full source code for this controller is available here.
Below are some photos of the controller. I used a ready-made plastic box for the enclosure with some rubber feet at the bottom, I think it adds a nice touch.
And this is a demo of the controller in action!
I am very happy with how the controller turned out. I do enjoy the transparent case, even though I do admit that I can do a better job of organizing the wires.