Рет қаралды 12,594
🤩 FREE Arduino Crash Course 👇👇
bit.ly/get_Arduino_skills
Want to learn more? Check out our courses!
bit.ly/2WtFxuw
**Get your Free Trial of Altium PCB design Software**
www.altium.com/yt/programming...
**Get the code, transcript, challenges, etc for this lesson on our website**
bit.ly/3jjqFI0
We designed this circuit board for beginners!
Kit-On-A-Shield: amzn.to/3lfWClU
FOLLOW US ELSEWHERE
---------------------------------------------------
Facebook: / programmingelectronics...
Twitter: / progelecacademy
Website: www.programmingelectronics.com/
**About Us:**
This Arduino lesson was created by Programming Electronics Academy. We are an online education company who seeks to help people learn about electronics and programming through the ubiquitous Arduino development board.
***We have no affiliation whatsoever with Arduino LLC, other than we think they are cool.***Want to learn more? Check out our courses!
Check out this retro pong Arduino game built with an Arduino UNO microcontroller development board! We have included the Arduino code and circuit digram at the bottom of this post so you can easily build this yourself too.
Steve Stefandis, who does technical writing for PEA, designed this really fun retro pong game with 5 components (OK and a resistor too!), and I think you’ll get a kick out of how it works!
THE BUILD
Pong Arduino game on proto-shield
Steve used an Arduino nano for his design, when I built it , I ended up using an Arduino UNO with a proto-shield on top - if you have no idea what an Arduino is, or what an Arduino shield is, make sure to check out our our other KZfaq videos that go into all those kind of details.
Those shields can come in handy, because it has a built in solderless breadboard for prototyping something small right on top.
The display for this is an OLED module. You can pick these up anywhere, I got mine on amazon. These things are super cheap and pretty easy to use with the graphics libraries out there - Steve used the u8glib library for this project.
A piezo buzzer is for adding sound effects for when the ball hits the paddle, wall, and when you lose. I was impressed with the buzzer noises, coming from a simple piezo buzzer - they sound pretty good! It really reminds me of an old school game.
The last part is a rotary encoder. This is the dial that allows you to move the paddle back and forth - you can also press down on the dial, and this acts as a button that is used for adjusting different settings which I show you in a moment.
Rotary encoders are great for building interfaces with limited space, where you need to make selections. With the right code you can track exactly where the shaft is any given time. If you are ever interested in learning how to program these, we have an entire course at PEA that covers how to write code to use these - you learn a bunch about interrupts in the process - it’s pretty cool!
This rotary encoder comes attached to a PCB base making it breadboard friendly. Again, this is all stuff you can easily get on amazon or any electronics vendor for that matter.
That’s pretty much it for components of this pong Arduino game, save a single 100Ohm resistor for the piezo buzzer.
ARDUINO PONG GAME PLAY
I already uploaded the code onto the Arduino board, so once this is powered up you start playing immediately.
pong Arduino game OLED display
You’ll notice when I first built this, to my surprise I had used an OLED display that had a yellow only bar at the top. So the whole top quarter of the screen is yellow, and the bottom half is blue. I ended up really liking the 2 tone look - it sort of reminded me of a glitch I might see on some old arcade
CONTINUED…
bit.ly/3jjqFI0