{"id":18875951,"url":"https://github.com/chobbycode/arduino-game-template","last_synced_at":"2026-06-30T06:31:05.550Z","repository":{"id":179032803,"uuid":"662568347","full_name":"ChobbyCode/Arduino-Game-Template","owner":"ChobbyCode","description":"An Arduino game template to start making games on the Arduino","archived":false,"fork":false,"pushed_at":"2023-07-09T17:11:54.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-31T01:30:59.003Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChobbyCode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-05T12:13:47.000Z","updated_at":"2023-07-05T19:39:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"23495afb-e906-4a09-b0ba-d187f5ae5b4b","html_url":"https://github.com/ChobbyCode/Arduino-Game-Template","commit_stats":null,"previous_names":["chobbycode/arduino-game-template"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ChobbyCode/Arduino-Game-Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChobbyCode%2FArduino-Game-Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChobbyCode%2FArduino-Game-Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChobbyCode%2FArduino-Game-Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChobbyCode%2FArduino-Game-Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChobbyCode","download_url":"https://codeload.github.com/ChobbyCode/Arduino-Game-Template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChobbyCode%2FArduino-Game-Template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34955985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T06:09:53.454Z","updated_at":"2026-06-30T06:31:05.545Z","avatar_url":"https://github.com/ChobbyCode.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Arduino-Game-Template\n\nThis is a template/tutorial to make games on the Arduino Uno Rev 3. \n\nUPDATE/IMPORTANT: Remember to change the I2C port. It says it in the code too.\n\n### You will need:\n\n- An Arduino Uno Rev 3 (or any other interchangeable microcontroller)\n- 1x breadboard for soldering board\n- 6x Plunger Tactile Push Buttons\n- 1x oled I2C displayA\n- 20x jumper cables male - male\n- Power Supply (could connect to computer)\n\n## Connections\n\nStart by placing the components on the bread board. This can be seen below.\n\n![image](https://github.com/ChobbyCode/Arduino-Game-Template/assets/100038952/4c409093-bbe5-4743-8f30-2a2f817c0953)\n\nConnects are as followed...\n\nConnect ground to the left of all buttons, you can do this by dedicating a column to the ground and taking from there when needed.\n\nThe connections for the screen are seen below. \n\nGND -\u003e GND\n\n5V -\u003e VCC\n\nA5 -\u003e SCK/SCL\n\nA4 -\u003e SDA\n\n![image](https://github.com/ChobbyCode/Arduino-Game-Template/assets/100038952/7d0a16e6-1476-4097-8d09-b5c68d4bac44)\n\nimage credit: miliohm https://www.youtube.com/@miliohm\n\nIf you want a more detailed tutorial on the oled screen follow Miliohm's tutorial here -\u003e https://www.youtube.com/watch?v=rxjIXVwgY50\n\nMoving on to the input buttons (control scheme), the cables should be plugged into the right of the buttons on the breadboard and not the left as we used them for the screen. \nWe are going to be using the digital input. There are six buttons so we are going to use six digital input pins, 2 through 7.\n\nDigital input pin 2 will go to the left button, 3 will go to the up button, 4 will go to the down button, 5 will go to the right button. The two buttons on the right are the A \u0026 B buttons.\nPin 6 will go to the A button, whilst 7 goes to  B button.\n\nTheoretically if all connections are good then you are good to go.\n\n## Using the code base\n\nThe application will make a square move left, right, up \u0026 down based on what keys are pressed. This project is suppose to act as a demo to show you how to draw to a Oled I2C display, read inputs from buttons, and on how to act on those inputs to make changes to the screen.\n\nRemember to change your I2C port or the screen will not work \u0026 it will give a error. The 0x3C is what needs to be changed. You can also get the I2C port easily by running this program -\u003e https://github.com/ChobbyCode/Oled-I2C-Screen-Port-Grabber\n\n![image](https://github.com/ChobbyCode/Arduino-Game-Template/assets/100038952/5b8a7db0-2d97-4448-ab74-2cd49b382955)\n\n\nYou can see at the bottom of the main file there are a lot of unused functions. These are the input functions, these functions are called whenever a condition for that button is met, i.e. if a is held then aDown(){} is called.\n\nYou should be able to work out how everything works from just reading it, if you are newer to cpp/c then I will explain it. The tabs on the top are there to keep most of the input boilerplate out of the way. The paint functions gets called when something new needs to be drawn to the screen. The input functions at the bottom of the main file are called when the input conditions are met which can be modified in inputManager.cpp. Most of the other code is explained by comments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchobbycode%2Farduino-game-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchobbycode%2Farduino-game-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchobbycode%2Farduino-game-template/lists"}