This firmware gives Maker Badge these functions:
- Badge
- OTA FW update
- Home mode - periodically updated dashboard with data from home assitant server.
- uses Home Assistant REST API http get.
- deep sleep is used in the time between updates
- MakerCall
- Framework: Arduino
- IDE: Platformio
To use all the features, the config file must be edited and program compiled and flashed using PlatformIO or Arduino IDE. (guide B)
If you want to use only MakerCall communicator, follow the shorter guide (guide A).
Direct flash of the firmware without an option to change code.
- Download flash tool from releases/assets
- Unpack all
- Connect MakerBadge to PC and put to download mode (hold BOOT and click RESET)
- Run update_badge_verC.bat or update_badge_verD.bat depending on your badge version. Firmware should be flashed. If the device is not found check COM port number and edit it in update script
- Press Reset button to run new firmware.
This guide is made for programming makerbadge in Platformio IDE in VScode. MakerBadge come originally flashed with CircutPython.
- Start VScode with platformio and clone this repo.
- Set or verify the USB upload is enabled in platformio.ini:
[platformio] default_envs = esp32-s2-USB #default_envs = esp32-s2-OTA
- Connect USB-C to PC and put Makerbadge to download mode (hold BOOT and click RESET)
- Rename
config_template.h
toconfig.h
(enter your name if you want) - Verify in
config.h
that you have the correct Maker Badge version selected. - Hit Upload (for the first upload, MB need to be in download mode)
- Arduino code should run.
Pro tip:
- For better serial debugging add 3s delay on the start of the
setup()
by uncommentingdelay(3000);
, so COM port has time to connect before you log anything. Don't forget to comment it in final code.
- Make a new folder (
makerbadge
) in your pc. - Copy src/main.cpp and rename to
makebadge.ino
and place to foler - Copy
config_template.h
, place to folder and rename toconfig.h
and verify inconfig.h
that you have the correct Maker Badge version selected. - Copy
OTA.h
to the folder - Install missing libraries (FastLED by Daniel Garcia and GxEPD2)
- Select Adafruit Feather ESP32-S2 board
- Put Badge into download mode
- Upload.
If experiencing issues, you can try to do a full-erase of ESP32 memory.
- Open command line in VScode and run
pio run --target erase
. Result should sayChip erase completed successfully in...
. Error on the end is ok.
This firmware use Arduino and compiled code. The MakerBadge is originally shipped with CircutPython. To go back to CPY, follow this guide
The original python code is saved in this repository.
Hardware for a makerbadge made by @dronecz.
- up to revision C (C included), badge sometimes "forgets" where in menu it was when waking up from deep sleep. This is caused by voltage drop on ESP32-S2 power pin during high load in wake-up. Hot fix is possible in HW (how-to TBD).
Project is compatible, or can be easily adjusted for any eInk that is supported by GxEPD2 library and has ESP32-S2 (or other ESP32 IC).
- ESPNOW part inspired by https://github.com/atomic14/ESPNowSimpleSample