TWANG ESP32 Led Strip 1D Game
Mirko Pavleski Mirko Pavleski
21.1K subscribers
4,921 views
0

 Published On Apr 23, 2022

Twang32 is an adventure game placed on a long line of luminous points which in this case is an Led strip with WS2812 Leds. With the help of a flexible joystick, the player must moves his character, one of the LEDs, in a one-dimensional line world. The player will have to overcome obstacles and face enemies in order to find the exit.
I made small modifications by making a custom case, and I use a spring that I managed to find in my workshop. The downside is that the LED strip takes up a lot of space which is quite impractical, as a standard LED strip can contain up to 144 LEDs per meter. For this purpose I use the RGB Programmable LED Strip from DFRobot which contains 166 diodes with a length of only 50 centimeters and is compatible with WS2812B strip .
The Controller uses a spring, and an accelerometer and is surprisingly precise joystick with a unique 'wobble' action (pull it back and let go to make it oscillate back and forth rapidly). It is this wobble action that is core to the experience while game playing.
As I mentioned before the device is very simple to build and contains only a few components:
- ESP32 based microcontroller board
- PAM8403 small D-class amplifier board
- buzzer
- MPU6050 - 6-axis Motion Tracking device which is located at the top of the joystick.
- And an LED strip that can contain from 60 to 1000 LEDs. In this case it contains 166 Leds, which is quite a sufficient number for comfortable playing.
The game consists of 20 levels where each subsequent level is more difficult than the previous one. By moving the joystick forward/backward, the green (player) diode also moves. The speed of movement increases in proportion to the increase in angle. If we tilt the joystick side-to-side or wobble it, the weapon that destroys the enemy is activated. If you take a closer look at the code, in the "void loadLevel" section there is a commented tutorial for editing or creating new levels of your own.
The game also has a WiFi access port to get game stats. We need to connect a smartphone or computer to see them.
Unlike the original, where the box is made on a 3D printer, I mounted it in a suitable box made of PVC board with a thickness of 3 mm because for me it was a simpler solution.

Detailed instructions, schematic ,and code at:
https://www.hackster.io/mircemk/twang...

If you like my job buy me a coffee: https://ko-fi.com/mircemk


If you are interested in this area, look at the Playlist with all my Arduino Games at:
   • Weather Instruments  

Visit my Youtube Channel for more Projects , DIY and How To Make videos:
   / mirkopavles.  .
by mircemk
SUBSCRIBE LIKE AND SHARE !!!!
Thanks for your Support !

show more

Share/Embed