In this video, we are going to build an Arduino Game, the classic Pong game! The Arduino Pong Game is a very easy Arduino Project to build, it won’t take you more than 15 minutes!
Arduino Pong Game – The Parts
Hey guys, I am Nick and welcome to educ8s.tv a channel that is all about DIY electronics projects with Arduino, Raspberry Pi, ESP8266 and other popular boards. In this video, we are going to build an Arduino powered Game. It is the classic Pong Game! I am now playing against the computer controlling the green paddle. Each time a player scores, the score is displayed on the screen. The first player to reach 8 points wins! It is a fun project to build and as you are going to find out, it won’t take you more than 10 minutes to build it. Let’s start!
The parts needed in order to build this project are the following:
——————–
WHERE TO BUY
——————–
Arduino Uno: https://educ8s.tv/part/ArduinoUno
Color OLED: http://educ8s.tv/part/ColorOLED
Small Breadboard: https://educ8s.tv/part/SmallBreadboard
Push Buttons: https://educ8s.tv/part/Buttons
Jumper Wires: https://educ8s.tv/part/JumperWires
Wires: https://educ8s.tv/part/Wires
Full disclosure: All of the links above are affiliate links. I get a small percentage of each sale they generate. Thank you for your support!
[adsense]Arduino Pong Game – The Code
——————–
LIBRARIES
——————–
? Adafruit GFX: https://github.com/adafruit/Adafruit-GFX-Library
? Color OLED library: https://github.com/adafruit/Adafruit-SSD1331-OLED-Driver-Library-for-Arduino
Let’s now take a quick look at the code. The code of this project is based on the code of a pong game for the monochrome OLED display. You can find the link for the original code in the description of the video below. I modified the code to work with the color OLED display, I added the splash screen, and the score, and the Game Over screen. The project needs two libraries in order to compile. We need the Adafruit GFX library and the library for the OLED display.
By adjusting the values of these variables you can change the difficulty of the game. You can set the ball speed, the paddle speed, the paddle height and the maximum score in order to make the game fit your taste. That’s it, upload the code to Arduino and have fun! As always you can find the code of the project and links for the libraries in the description of the video below.
——————–
CODE OF THE PROJECT
——————–
——————–
SUBSCRIBE ON YOUTUBE
——————–
Never miss a video: Subscribe to educ8s.tv[/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]
i had an error it prompts this error, can you please help me?
C:\arduino\arduino-1.0.5-r2\libraries\Robot_Control\ArduinoRobot.cpp: In constructor ‘RobotControl::RobotControl()’:
C:\arduino\arduino-1.0.5-r2\libraries\Robot_Control\ArduinoRobot.cpp:8: error: ‘LCD_CS’ was not declared in this scope
C:\arduino\arduino-1.0.5-r2\libraries\Robot_Control\ArduinoRobot.cpp:8: error: ‘DC_LCD’ was not declared in this scope
C:\arduino\arduino-1.0.5-r2\libraries\Robot_Control\ArduinoRobot.cpp:8: error: ‘RST_LCD’ was not declared in this scope
C:\arduino\arduino-1.0.5-r2\libraries\Robot_Control\ArduinoRobot.cpp: In member function ‘void RobotControl::begin()’:
C:\arduino\arduino-1.0.5-r2\libraries\Robot_Control\ArduinoRobot.cpp:18: error: ‘MUXA’ was not declared in this scope
C:\arduino\arduino-1.0.5-r2\libraries\Robot_Control\ArduinoRobot.cpp:18: error: ‘MUXB’ was not declared in this scope
C:\arduino\arduino-1.0.5-r2\libraries\Robot_Control\ArduinoRobot.cpp:18: error: ‘MUXC’ was not declared in this scope
C:\arduino\arduino-1.0.5-r2\libraries\Robot_Control\ArduinoRobot.cpp:18: error: ‘MUXD’ was not declared in this scope
C:\arduino\arduino-1.0.5-r2\libraries\Robot_Control\ArduinoRobot.cpp:19: error: ‘MUX_IN’ was not declared in this scope
C:\arduino\arduino-1.0.5-r2\libraries\Robot_Control\ArduinoRobot.cpp:22: error: ‘BUZZ’ was not declared in this scope
C:\arduino\arduino-1.0.5-r2\libraries\Robot_Control\ArduinoRobot.cpp:25: error: ‘Serial1’ was not declared in this scope
your adafruit gfx library has not been included in your code
how do you do this?
with monochrome how am gonna make the wiring and what will be the change in code?
Cute project, I decided to lay out a small PC board to simplify construction and make for a more compact and portable game.
The boards can be ordered thru: https://www.pcbway.com/project/shareproject/Arduino_Pong_Game.html
CAN ONE OF YOU GUYS HELP ME?????
The switch cannot move the board! help me!
the wiers need to be male to male or what?
Why the code cannot compiling? They say display was not declared in this scope
Did you download the SSD1331 OLED library?