LedPong is a fun and interactive implementation of the classic Pong game designed for the Arduino UNO R4 WiFi. The game utilizes the LED Matrix from the Arduino Plug&Make kit to display the ball and paddles, providing a nostalgic and engaging experience. The ball is represented by a moving LED, creating a visually appealing game environment. Additional features like a secondary Modulino encoder and optional secondary Modulino Pixels enhance the gameplay with background colors and effects.
- Classic Pong game on an LED Matrix.
- Interactive game with two paddles controlled by rotary encoders.
- Sound effects using a buzzer.
- Visual effects with background LEDs.
- Configurable game settings including ball speed and winning conditions.
- Arduino UNO R4 WiFi
- Arduino Plug&Make kit
- Secondary Modulino encoder (required)
- Secondary Modulino Pixels (optional for background effects)
- Arduino IDE
-
Clone the Repository:
git clone https://github.com/lukdog/LedPong.git cd LedPong
-
Install Required Libraries:
Modulino
Scheduler
Arduino_LED_Matrix
You can install these libraries via the Arduino Library Manager.
-
Upload the Code:
- Open the
LedPong.ino
file in the Arduino IDE. - Connect your Arduino UNO R4 WiFi to your computer.
- Select the correct board and port from the Tools menu.
- Upload the code to your Arduino.
- Open the
-
Setup:
- Assemble your hardware setup as described in the requirements.
- Ensure all connections are secure and components are powered.
-
Start the Game:
- Power on your Arduino UNO R4 WiFi.
- The game will initialize and start with an animation.
-
Playing the Game:
- Use the rotary encoders to control the paddles.
- The game will keep score and display the ball's movement on the LED Matrix.
- Left Paddle: Controlled by the primary Modulino encoder.
- Right Paddle: Controlled by the secondary Modulino encoder.
- Mute Sound: Press the button connected to pin 12 to mute/unmute the sound.
You can customize various aspects of the game by modifying the following defines in the code:
- Ball Speed: Adjust the ball's speed by changing
BALL_SPEED
. - Winning Conditions: Set the number of points required to win by modifying
MATCH_TO_WIN
. - LED Brightness: Change the brightness of the LEDs using
LED_BRI
.
We welcome contributions to enhance the game. To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes.
- Push to the branch.
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
Enjoy playing LedPong on your Arduino UNO R4 WiFi! If you encounter any issues or have suggestions for improvements, please open an issue on the GitHub repository.