The Idea
The Arduino UNO R4 WiFi has a fantastic built-in 12x8 LED matrix, and I wanted to create a simple yet captivating demo to explore its capabilities. At just the right time, I found "Pong Wars for Unit Puzzle" by Yuikawa_Akira and used it as a reference.
How It Works
This isn't a game you play, but a mesmerizing visual demo you watch. The concept is simple:
- The screen is divided into two territories: a lit (red) area and an unlit area.
- Two "balls"—one lit dot and one unlit dot—move across the screen
- When a ball hits the boundary of the opposing territory, it "conquers" a piece of it. Its own territory expands, and the opponent's shrinks.
- When a ball hits the back wall (the physical edge of the matrix), it bounces back to defend its space or reclaim lost ground.
This creates a constant push-and-pull, a visual tug-of-war that is surprisingly engaging to watch on the small matrix.
Hardware & Software
The beauty of this project is its simplicity. All you need is:
- An Arduino UNO R4 WiFi
That's it! No other components are necessary.
The code is written in the Arduino IDE. The core logic tracks the position and velocity of the balls, detects collisions with the dynamic boundaries, and redraws the matrix in real-time to reflect the changing territories.
It’s a simple but effective demonstration of what's possible with this great little feature of the UNO R4 WiFi.
Comments