This repository contains the code for my fast-paced Arduino-run Snake as well as the circuit for it. It is faster than most other games like it.
You can find the main file in Snake_Game.ino
| Name | By |
|---|---|
U8g2 |
olikraus |
EEPROM |
Arduino |
Wire |
Arduino |
- An Arduino UNO compatible microcontroller board or any microcontroller with 6+ digital ports and I2C compatibility
- A 128×64 I2C single-color OLED display (SH1106 or SSD1306)
- Passive buzzer
Everything else is shown in the schematic and can be a generic type.
- If you use a microcontroller with ≤2kB of RAM, it will likely crash or maybe not even compile.
- If you are using another microcontroller besides an Arduino UNO, make sure you connect SCK and SDA to its SCL and SDA pins, which may or may not be on A5 and A4.
- If you are using a SSD1306 instead of a SH1106 screen, change the constructor from either
U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);orU8G2_SH1106_128X64_NONAME_1q_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);toU8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE);orU8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE);, respectively.