{"page":"\u003clink rel=\"stylesheet\" href=\"https://lessonplanet.com/assets/packs/css/resources-c03aa079.css\" /\u003e\n\u003clink rel=\"stylesheet\" href=\"https://lessonplanet.com/assets/packs/css/lp_boclips_stylesheets-517835be.css\" media=\"all\" /\u003e\n\u003cdiv data-title='DIY retro pong game that fits in your pocket' data-url='/boclips/videos/62a0e47ee5902514c0697524' data-video-url='/boclips/videos/62a0e47ee5902514c0697524' id='bo_player_modal'\u003e\n\u003cdiv class='boclips-resource-page modal-dialog panel-container'\u003e\n\u003cdiv class='react-notifications-root'\u003e\u003c/div\u003e\n\u003cdiv class='rp-header'\u003e\n\u003cdiv class='rp-type'\u003e\n\u003ci aria-hidden='true' class='fai fa-regular fa-circle-play'\u003e\u003c/i\u003e\nVideo\n\u003c/div\u003e\n\u003ch1 class='rp-title' id='video-title'\u003e\nDIY retro pong game that fits in your pocket\n\u003c/h1\u003e\n\u003cdiv class='rp-actions'\u003e\n\u003cdiv class='mr-1'\u003e\n\u003ca class=\"btn btn-success\" data-posthog-event=\"Signup: LP Signup Activity\" data-posthog-location=\"body_link_boclips\" data-remote=\"true\" href=\"/subscription/new\"\u003e\u003cspan\u003e\u003cspan\u003eGet Free Access\u003c/span\u003e\u003cspan class=\"\"\u003e for 10 Days\u003c/span\u003e\u003cspan\u003e!\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv class='rp-body'\u003e\n\u003cdiv class='rp-info'\u003e\n\u003cdiv aria-label='Hide resource details' class='rp-hide-info' role='button' tabindex='0'\u003e\u0026times;\u003c/div\u003e\n\u003ci aria-label='Expand resource details' class='rp-expand-info fai fa-solid fa-up-right-and-down-left-from-center' role='button' tabindex='0'\u003e\u003c/i\u003e\n\u003ci aria-label='Compress resource details' class='rp-compress-info fai fa-solid fa-down-left-and-up-right-to-center' role='button' tabindex='0'\u003e\u003c/i\u003e\n\u003cdiv class='rp-rating'\u003e\n\u003cspan class='resource-pool'\u003e\n\u003cspan class='pool-label'\u003ePublisher:\u003c/span\u003e\n\u003cspan class='pool-name'\u003e\n\u003cspan class='text'\u003e\u003ca data-publisher-id=\"30358947\" href=\"/search?publisher_ids%5B%5D=30358947\"\u003eProgramming Electronics Academy\u003c/a\u003e\u003c/span\u003e\n\u003c/span\u003e\n\u003c/span\u003e\n\u003c/div\u003e\n\u003cdiv class='rp-description'\u003e\n\u003cspan class='short-description'\u003eThis 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.Check out this...\u003c/span\u003e\n\u003cspan class='full-description hide'\u003eThis 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.\u003cbr/\u003e\u003cbr/\u003eCheck 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.\u003cbr/\u003e\u003cbr/\u003eSteve 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!\u003cbr/\u003e\u003cbr/\u003eTHE BUILD\u003cbr/\u003ePong Arduino game on proto-shield\u003cbr/\u003eSteve 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 YouTube videos that go into all those kind of details.\u003cbr/\u003e\u003cbr/\u003eThose shields can come in handy, because it has a built in solderless breadboard for prototyping something small right on top.\u003cbr/\u003e\u003cbr/\u003eThe 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.\u003cbr/\u003e\u003cbr/\u003eA 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.\u003cbr/\u003e\u003cbr/\u003eThe 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.\u003cbr/\u003e\u003cbr/\u003eRotary 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!\u003cbr/\u003e\u003cbr/\u003eThis 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.\u003cbr/\u003e\u003cbr/\u003eThat’s pretty much it for components of this pong Arduino game, save a single 100Ohm resistor for the piezo buzzer.\u003cbr/\u003e\u003cbr/\u003eARDUINO PONG GAME PLAY\u003cbr/\u003eI already uploaded the code onto the Arduino board, so once this is powered up you start playing immediately.\u003cbr/\u003e\u003cbr/\u003epong Arduino game OLED display\u003cbr/\u003eYou’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 game back of a pizza shop. I am no gamer, but I used to play pong in a local pizza shop when I was kid…good memories.\u003cbr/\u003e\u003cbr/\u003eTo move the paddle you just rotate the rotary encoder back and forth – it’s super responsive – and if you see me missing the ball, it’s just because my gaming skills are subpar…\u003cbr/\u003e\u003c/span\u003e\n\u003c/div\u003e\n\u003cdiv class='action-container flex justify-between'\u003e\n\u003cbutton aria-expanded='false' aria-label='Read more description' class='rp-full-description' type='button'\u003e\n\u003ci class='fai fa-solid fa-align-left'\u003e\u003c/i\u003e\n\u003cspan id='read_more'\u003eRead More\u003c/span\u003e\n\u003c/button\u003e\n\u003cdiv class='rp-report'\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv aria-labelledby='resource-details-heading' class='rp-info-section'\u003e\n\u003ch2 class='title' id='resource-details-heading'\u003eResource Details\u003c/h2\u003e\n\u003cdiv class='rp-resource-details clearfix'\u003e\n\u003cdiv class='detail'\u003e\n\u003cdl\u003e\n\u003cdt\u003eCurator Rating\u003c/dt\u003e\n\u003cdd\u003e\u003cspan class=\"star-rating\" aria-label=\"4.0 out of 5 stars\" role=\"img\"\u003e\u003ci class=\"fa-solid fa-star text-action\" aria-hidden=\"true\"\u003e\u003c/i\u003e\u003ci class=\"fa-solid fa-star text-action\" aria-hidden=\"true\"\u003e\u003c/i\u003e\u003ci class=\"fa-solid fa-star text-action\" aria-hidden=\"true\"\u003e\u003c/i\u003e\u003ci class=\"fa-solid fa-star text-action\" aria-hidden=\"true\"\u003e\u003c/i\u003e\u003ci class=\"fa-regular fa-star text-action\" aria-hidden=\"true\"\u003e\u003c/i\u003e\u003c/span\u003e\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cdiv class='detail'\u003e\n\u003cdl\u003e\n\u003cdt class=\"educator-rating-title\"\u003eEducator Rating\u003c/dt\u003e\u003cdd\u003e\u003cdiv class=\"educator-rating-details\" data-path=\"/educator_ratings/rrp_data?resourceable_id=206276\u0026amp;resourceable_type=Boclips%3A%3AVideoMetadata\"\u003e\u003cspan class=\"not-yet-rated\"\u003eNot yet Rated\u003c/span\u003e\u003c/div\u003e\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cdiv class='detail'\u003e\n\u003cdl\u003e\n\u003cdt\u003eMedia Length\u003c/dt\u003e\n\u003cdd\u003e6:22\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cdiv class='detail'\u003e\n\u003cdl\u003e\n\u003cdt\u003eGrade\u003c/dt\u003e\u003cdd title=\"Grade\"\u003eHigher Ed\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cdiv class='detail'\u003e\n\u003cdl\u003e\n\u003cdt\u003eSubjects\u003c/dt\u003e\u003cdd\u003e\u003cspan\u003e\u003ca href=\"/search?keywords=deductive+reasoning+puzzles\u0026amp;rating=4\u0026amp;search_tab_id=1\u0026amp;subject_ids%5B%5D=378077\"\u003eSTEM\u003c/a\u003e\u003c/span\u003e\u003c/dd\u003e\u003cdd class=\"text-muted\"\u003e\u003ci class=\"fa-solid fa-lock mr5\"\u003e\u003c/i\u003e1 more...\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cdiv class='detail'\u003e\n\u003cdl\u003e\n\u003cdt\u003eMedia Type\u003c/dt\u003e\u003cdd\u003e\u003cspan\u003e\u003ca href=\"/search?keywords=deductive+reasoning+puzzles\u0026amp;rating=4\u0026amp;search_tab_id=2\u0026amp;type_ids%5B%5D=4543647\"\u003eInstructional Videos\u003c/a\u003e\u003c/span\u003e\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cdiv class='detail'\u003e\n\u003cdl\u003e\n\u003cdt\u003eSource:\u003c/dt\u003e\n\u003cdiv class='preview-source' data-animation='true' data-boundary='.rp-info' data-container='.rp-resource-details' data-html='false' data-title='Got questions about Arduino? We have the best Arduino tutorials, lessons, and courses that you\u0026#39;ll find, presented in a way you’ll love.  At Programming Electronics Academy we are all about teaching programming and electronics with Arduino.' data-trigger='hover focus'\u003e\n\u003cspan\u003eProgramming Electronics Academy\u003c/span\u003e\n\u003ci aria-hidden='true' class='fa-solid fa-circle-info channel-tooltip-icon' id='channel-tooltip'\u003e\u003c/i\u003e\n\u003c/div\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cdiv class='detail'\u003e\n\u003cdl\u003e\n\u003cdt\u003eDate\u003c/dt\u003e\n\u003cdd\u003e2021\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cdiv class='detail'\u003e\n\u003cdl\u003e\n\u003ci aria-hidden='true' class='fai fa-solid fa-language'\u003e\u003c/i\u003e\n\u003cdt\u003eLanguage\u003c/dt\u003e\u003cdd\u003eEnglish\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cdiv class='detail'\u003e\n\u003cdl\u003e\n\u003cdt\u003eAudiences\u003c/dt\u003e\u003cdd\u003e\u003cspan\u003e\u003ca href=\"/search?audience_ids%5B%5D=371079\u0026amp;keywords=deductive+reasoning+puzzles\u0026amp;rating=4\u0026amp;search_tab_id=1\"\u003eFor Teacher Use\u003c/a\u003e\u003c/span\u003e\u003c/dd\u003e\u003cdd class=\"text-muted\"\u003e\u003ci class=\"fa-solid fa-lock mr5\"\u003e\u003c/i\u003e2 more...\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cdiv class='detail'\u003e\n\u003cdl\u003e\n\u003cdt\u003eUsage Permissions\u003c/dt\u003e\u003cdd\u003eFine Print: Educational Use\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv aria-labelledby='additional-materials-heading' class='rp-info-section'\u003e\n\u003ch2 class='title' id='additional-materials-heading'\u003eAdditional Materials\u003c/h2\u003e\n\u003cdiv class='additional-material'\u003e\n\u003ci aria-hidden='true' class='fai fa-solid fa-lock'\u003e\u003c/i\u003e\n\u003ca class=\"text-muted\" title=\"Video Transcript\" data-html=\"true\" data-placement=\"bottom\" data-trigger=\"click\" data-content=\"\u003cdiv class=\u0026quot;text-center py-2\u0026quot;\u003e\u003ca class=\u0026quot;bold\u0026quot; href=\u0026quot;/auth/users/sign_in\u0026quot;\u003eSign in\u003c/a\u003e or \u003ca class=\u0026quot;bold text-danger\u0026quot; data-posthog-event=\u0026quot;Signup: LP Signup Activity\u0026quot; data-posthog-location=\u0026quot;body_link_boclips\u0026quot; data-remote=\u0026quot;true\u0026quot; href=\u0026quot;/subscription/new\u0026quot;\u003eJoin Now\u003c/a\u003e\u003c/div\u003e\" data-title=\"Get Full Access\" data-container=\"body\" rel=\"popover\" tabindex=\"0\" href=\"/subscription/new\"\u003eVideo Transcript\u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv class='additional-material'\u003e\n\u003ci aria-hidden='true' class='fai fa-solid fa-lock'\u003e\u003c/i\u003e\n\u003ca class=\"text-muted\" title=\"Video Preview\" data-html=\"true\" data-placement=\"bottom\" data-trigger=\"click\" data-content=\"\u003cdiv class=\u0026quot;text-center py-2\u0026quot;\u003e\u003ca class=\u0026quot;bold\u0026quot; href=\u0026quot;/auth/users/sign_in\u0026quot;\u003eSign in\u003c/a\u003e or \u003ca class=\u0026quot;bold text-danger\u0026quot; data-posthog-event=\u0026quot;Signup: LP Signup Activity\u0026quot; data-posthog-location=\u0026quot;body_link_boclips\u0026quot; data-remote=\u0026quot;true\u0026quot; href=\u0026quot;/subscription/new\u0026quot;\u003eJoin Now\u003c/a\u003e\u003c/div\u003e\" data-title=\"Get Full Access\" data-container=\"body\" rel=\"popover\" tabindex=\"0\" href=\"/subscription/new\"\u003eVideo Preview\u003c/a\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv aria-labelledby='concepts-heading' class='rp-info-section'\u003e\n\u003ch2 class='title' id='concepts-heading'\u003eConcepts\u003c/h2\u003e\n\u003cdiv class='clearfix'\u003e\n\u003cdiv class='details-list concepts' data-identifier='Boclips::VideoDecorator62a0e47ee5902514c0697524' data-type='concepts'\u003edesign, electronics\u003c/div\u003e\n\u003cdiv class='concepts-toggle-buttons' data-identifier='Boclips::VideoDecorator62a0e47ee5902514c0697524'\u003e\n\u003cbutton aria-expanded='false' class='more btn-link' type='button'\u003e\n\u003cspan\u003eShow More\u003c/span\u003e\n\u003ci aria-hidden='true' class='fa-solid fa-caret-down ml5'\u003e\u003c/i\u003e\n\u003c/button\u003e\n\u003cbutton aria-expanded='true' class='less btn-link' style='display: none;' type='button'\u003e\n\u003cspan\u003eShow Less\u003c/span\u003e\n\u003ci aria-hidden='true' class='fa-solid fa-caret-up ml5'\u003e\u003c/i\u003e\n\u003c/button\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv aria-labelledby='additional-tags-heading' class='rp-info-section'\u003e\n\u003ch2 class='title' id='additional-tags-heading'\u003eAdditional Tags\u003c/h2\u003e\n\u003cdiv class='clearfix'\u003e\n\u003cdiv class='details-list keyterms' data-identifier='Boclips::VideoDecorator62a0e47ee5902514c0697524' data-type='keyterms'\u003earduino, arduino lesson, open source hardware group, learning arduino, microcontrollers, arduino ide, arduino sketch, c++, programming electronics academy, how to make a game, retro gaming now, arduino programming, arduino project, ping pong, diy ping pong, diy retro arcade, mini arcade machine, mini arcade, diy gaming, retro gaming setup, retro gaming, c++ pong tutorial, retro gaming pc, arduino tutorial, arduino programming for beginners, electronics projects, rotary encoder, free trial, pretty easy, game, paddle, settings, thing, steve, code, breadboard, ball, pong, selection, check, components, learn, make, build, built, ended, kind, handy, amazon, wall, dial, move, press, moment\u003c/div\u003e\n\u003cdiv class='keyterms-toggle-buttons' data-identifier='Boclips::VideoDecorator62a0e47ee5902514c0697524'\u003e\n\u003cbutton aria-expanded='false' class='more btn-link' type='button'\u003e\n\u003cspan\u003eShow More\u003c/span\u003e\n\u003ci aria-hidden='true' class='fa-solid fa-caret-down ml5'\u003e\u003c/i\u003e\n\u003c/button\u003e\n\u003cbutton aria-expanded='true' class='less btn-link' style='display: none;' type='button'\u003e\n\u003cspan\u003eShow Less\u003c/span\u003e\n\u003ci aria-hidden='true' class='fa-solid fa-caret-up ml5'\u003e\u003c/i\u003e\n\u003c/button\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv aria-labelledby='classroom-considerations-heading' class='rp-info-section'\u003e\n\u003ch2 class='title' id='classroom-considerations-heading'\u003eClassroom Considerations\u003c/h2\u003e\n\u003cdiv class='classroom-considerations'\u003e\u003cdiv class='fai fa-solid fa-bell'\u003e\u003c/div\u003eBest For: Explaining a topic\u003c/div\u003e\u003cdiv class='classroom-considerations'\u003e\u003cdiv class='fai fa-solid fa-bell'\u003e\u003c/div\u003eVideo is ad-free\u003c/div\u003e \n\u003c/div\u003e\n\u003cdiv aria-labelledby='educator-ratings-heading' class='rp-info-section'\u003e\n\u003ch2 class='title sr-only' id='educator-ratings-heading'\u003eEducator Ratings\u003c/h2\u003e\n\u003cdiv id=\"educator-ratings-root\"\u003e\u003c/div\u003e\u003cdiv id=\"all-educator-ratings-root\"\u003e\u003c/div\u003e\u003cdiv id=\"educator-rating-form-root\"\u003e\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv class='rp-resource'\u003e\n\u003cdiv aria-label='Show resource details' class='rp-show-info' role='button' tabindex='0'\u003e\n\u003ci class='fai fa-solid fa-align-left'\u003e\u003c/i\u003e\nShow resource details\n\u003c/div\u003e\n\u003cdiv aria-label='Video player' class='player' id='player-wrapper' role='region'\u003e\n\u003cdiv class='relative container mx-auto' id='lp-boclips-visitor-thumbnail'\u003e\n\u003ca class=\"block\" data-html=\"true\" data-placement=\"bottom\" data-trigger=\"click\" data-content=\"\u003cdiv class=\u0026quot;text-center py-2\u0026quot;\u003e\u003ca class=\u0026quot;bold\u0026quot; href=\u0026quot;/auth/users/sign_in\u0026quot;\u003eSign in\u003c/a\u003e or \u003ca class=\u0026quot;bold text-danger\u0026quot; data-posthog-event=\u0026quot;Signup: LP Signup Activity\u0026quot; data-posthog-location=\u0026quot;body_link_boclips\u0026quot; data-remote=\u0026quot;true\u0026quot; href=\u0026quot;/subscription/new\u0026quot;\u003eJoin Now\u003c/a\u003e\u003c/div\u003e\" data-title=\"Get Full Access\" data-container=\"body\" rel=\"popover\" tabindex=\"0\" aria-label=\"Play video: DIY retro pong game that fits in your pocket\" href=\"/subscription/new\"\u003e\u003cimg class=\"resource-img img-thumbnail img-responsive z-10 lp-boclips-thumbnail w-full h-full lozad\" alt=\"DIY retro pong game that fits in your pocket\" title=\"DIY retro pong game that fits in your pocket\" onError=\"handleImageNotLoadedError(this)\" data-default-image=\"https://static.lp.lexp.cloud/images/attachment_defaults/resource/large/missing.png\" data-src=\"https://cdnapisec.kaltura.com/p/1776261/thumbnail/entry_id/1_04lzuk7f/width/250/vid_slices/3/vid_slice/1\" width=\"315\" height=\"220\" src=\"data:image/png;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs\" /\u003e\n\u003cspan aria-hidden='true' class='flex justify-center items-center bg-white rounded-full w-16 h-16 absolute top-1/2 left-1/2 -mt-8 -ml-8 cursor-pointer z-0 border-2 border-primary drop-shadow-md lp-boclips-thumbnail-playBtn'\u003e\n\u003ci class='fa-solid fa-play text-primary text-3xl ml-1 drop-shadow-xl'\u003e\u003c/i\u003e\n\u003c/span\u003e\n\u003c/a\u003e\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n"}