Microcontroller Monday - Vanguard
Micro:bit Monday is dead! Long live Microcontroller Monday which will cover boards such as Arduino, micro:bit, ESP, ATtiny85 and any news boards that come along.
For the inaugural post we take a look at a tool to flash firmware onto an ESP based board.
So what is it?
vgkits-vanguard is an easy to use tool to flash firmware on to an ESP based board.
Firmware is the bit between software and hardware than enables the two to talk to one another.
Created by my friend Cefn, the Vanguard project was created to support his range of ESP based kits
Early in my maker days I was invited to Morecambe to take part in Cefn's Shrimping event. The Shrimp was an Arduino Uno that you built yourself on a breadboard. I love these kits and own quite a few already.
vgkits-vanguard offers an easy to use terminal interface that replaces esptool / uPyCraft as a means to flash Micro Python to the board.
So where do I get it?
You can download and install vgkits-vanguard from pip!
On Linux / Mac
pip3 install vgkits-vanguard
pip3.exe install vgkits-vanguard
So now what?
With Vanguard installed plug in an ESP8266 (Wemos D1 is an ideal first device) to your computer.
Brainwash the Wemos D1 Mini
Brainwashing is a term used by Vanguard to refresh your board back to default. So if you wish to refresh a Vanguard board back to default Vanguard firmware, with the extra libraries then you can do that with just one command rather than one rather long and complex esptool command.
So how do we brainwash our Wemos D1 Mini to run Micro Python? Well to do that we open a terminal and start the brainwashing process.
$ vanguard brainwash micropython
This will download and install the latest MicroPython release on to the Wemos D1 Mini.
But wait...theres more!
Want to backup your Wemos D1 config to a computer? Well you can! Brainfreeze is a handy tool to dump the contents of your board to a
.bin file that acts as a backup. We can then flash that backup back on to the board at a later date, or use it on other boards.
To use it, in a terminal and with your board connected.
$ vanguard brainfreeze
Remember to rename the file so that you remember what it does / where it is from.
Then to flash that backup on to a board.
$ vanguard brainwash --input Your-Project-Here.bin
Why yes there is! if you would like to connect to your board, then typically you would need something like MiniCom / Screen / Putty to connect to the serial console and that would enable you to control and work with the board in a live environment. But sometimes that can be tricky for new users. So Vanguard offers a shell, which opens miniterm and connects to your board.
From a terminal type
$ vanguard shell
Then press Enter to open the connection. If the screen is unresponsive just press Enter to wake it up. To exit the screen press CTRL + ]
Vanguard also offers a file manager to work with files on your board.
$ vanguard see
So there we have it, vgkits-vanguard a great tool for working with MicroPython / CircuitPython boards.