At Saintcon 2024 we had a ham radio badge that needs to be flashed with custom firmware. Here’s how to do it!
Huge thanks to Ray-Man and redactd for their help in creating this awesome badge for our community!
You’ll need some kind of way to do UPDI programming. We used an Adafruit UPDI Friend set to 3V. Unless you’re using a breadboard to flash the badge, you will also likely want this cable.
Using the Arduino IDE
- Download the Arduino IDE and the firmware file
- Add the megaTinyCore library to the Arduino IDE. Detailed instructions here but the short version is:
- Open the Arduino IDE
- Go to File -> Preferences
- In the “Additional Boards Manager URLs” field, add
http://drazzy.com/package_drazzy.com_index.json
- Go to Tools -> Board -> Boards Manager
- Search for “megaTinyCore” and install it
- Open the firmware.ino file, and replace the text that says “YOUR CALL SIGN HERE” with your call sign. For example, mine would read
const char* message = "KZ0P";
- Go to Tools -> Board and select the option that includes the “ATtiny202” that isn’t the Optiboot option.
- Then, set Tools -> Programmer to Serial UPDI
- Connect your UPDI programmer to the badge. The UPDI pin can easily be located on the badge by looking for the trace with the jumper labeled J1 coming from the microcontroller. Ground will be the inner top right pin when looking at the back of the badge, and power will be the inner top left pin.
- Compile and Upload the firmware to the badge. If you get an error, send me an email or discord message and I’ll do my best to help but I am by no means an engineer.
Using Platformio
While trying to do this myself at the conference, I ran into an issue where the extra repo for megatinycore had expired SSL certificates, and so I used platformio instead to flash the badge. You can find my platformio conversion of the project here. To flash the board, you’ll need to install platformio core and the VS Code extension and run the following two commands to flash the badge after editing the .ino file to include your call sign:
source ~/.platformio/penv/bin/activate
pio run -e Upload_UPDI -t upload
I don’t know how you’d run these commands on windows, so if you know what you’re doing with windows and platformio reach out and let me know!