- ATTiny85 programmed by an Arduino AVR/USBasp via the pin header.
- Based on open Source repository from Tiny Joypad for the software.
- 128x64 SSD1306 screen.
- Requires an external programmer via an unpopulated AVR pin header.
- games/tools/api from danielc at tinyjoypad.com.
- TinyDriver.h from dschnur
take a look at the code here:
void drawGame() {
static uint16_t lastX = 0xFFFF;
static uint16_t lastY = 0xFFFF;
static uint16_t flagX = 313;
static uint16_t flagY = 37;
if (playerX == flagX && playerY == flagY) {
currentState = FLAG_SCREEN;
noTone(4); // Stop any active beep
return;
}
...
}
-
Install arduino IDE
-
Prepare programmer interface
-
prepare jumper wire to the respective pin on the programmer interface
-
connect the interface to PC
-
Check for the presence of programmer interface in your device manager
-
Open Arduino IDE and add this to your preferences - settings
-
Install ATTinyCore by Spence Konde
-
extract ssd1306xled-master.zip to this folder
C:\Users\lab\Documents\Arduino\libraries\ssd1306xled
-
Make sure to replace TinyDriver.h in your project.
-
Open your project.
-
Compile before flashing to the badge.
-
In arduino IDE, use this settings.
-
Click Upload, if the screen response is slow, burn bootloader and upload again.
Click to enlarge