To upgrade the firmware, you will need a computer and a USB A to Micro-B cable to access the D1 Mini’s serial interface. Linux distributions should already have the necessary USB serial drivers, but on Windows and MacOS, you will need to download and install the drivers from here.
You will also need esptool, which – as of this writing – will work on either Python 2.7 or Python 3.4+, and can be installed via pip install esptool
. Most Linux distribution should come preinstalled with Python 2.7 or Python 3.4+ (or both). MacOS comes with Python 2.7. On Windows, download and install Python 3 for Windows.
First, erase the device:
esptool.py --port /dev/ttyUSB0 erase_flash
Then write the new firmware to it:
esptool.py --port /dev/ttyUSB0 write_flash --flash_size=detect 0 demirgb-firmware-v0.4.1.bin
esptool.py will automatically reset the device after writing the firmware. The device will perform some first boot functions, then start flashing the blue diagnostic LED when it is done. When it’s done, reset the device and enter setup mode to reconfigure network settings as described here.
To access the MicroPython REPL (serial console), you will need a terminal program. On Windows, PuTTY is recommended; configure for the COM port of the USB serial driver (check Device Manager for that), 115200 baud, 8-N-1. On Linux and MacOS, picocom is recommended and should be available in your distribution’s package manager (and in MacOS’s case, Homebrew). To run:
$ picocom -b 115200 /dev/ttyUSB0 # Replace with device name of USB serial adapter
The DemiRGB will be in its main loop normally. To break out of it and reach the REPL, press Ctrl-C.
demirgb-firmware-v0.4.1.bin
- 563KiB, released 2018-09-23demirgb-firmware-v0.4.bin
- 562KiB, released 2018-09-23demirgb-firmware-v0.3.bin
- 562KiB, released 2018-02-04demirgb-firmware-v0.2.bin
- 578KiB, released 2018-01-29