Skip to content

najashark/MCC2024-Badge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Malaysia Cybersecurity Camp 2024 Badge

drawing


  • 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

How to solve?

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;
  }

  ...
}

How to flash?

  1. Install arduino IDE

  2. Prepare programmer interface

    1. Arduino Uno setup here
    2. USing USBasp, can find on sopi/ladaza.
  3. prepare jumper wire to the respective pin on the programmer interface

  4. connect the interface to PC

  5. Check for the presence of programmer interface in your device manager

    drawing
  6. Open Arduino IDE and add this to your preferences - settings

    drawing
  7. Install ATTinyCore by Spence Konde

    drawing
  8. extract ssd1306xled-master.zip to this folder

C:\Users\lab\Documents\Arduino\libraries\ssd1306xled
  1. Make sure to replace TinyDriver.h in your project.

  2. Open your project.

  3. Compile before flashing to the badge.

  4. In arduino IDE, use this settings.

    drawing
  5. Click Upload, if the screen response is slow, burn bootloader and upload again.

Pin label

Click to enlarge

drawing

About

Malaysia Cybersecurity Camp 2024 Badge

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published