An Arduino device which allows for easy scrobbling of things.
Decided to use MicroPython since whatever abomination of C++ sub or superset that Arduino normally uses is a huge pain to work with.
I'm using the MakerHawk ESP32 board.
- wiring diagram: https://raw.githubusercontent.com/Heltec-Aaron-Lee/WiFi_Kit_series/master/PinoutDiagram/WIFI%20Kit%2032.pdf
You'll want to define variables in the env.py
file, something like:
wifi_ssid = '<ssid>'
wifi_password = '<password>'
- install Python
choco install python3 -y
- check
python
andpip
are in your PATH - install tool with
pip install esptool
- verify installation with
esptool.py -h
(I had to find that file and add a another PATH var to it)
https://cyberblogspot.com/how-to-save-and-restore-esp8266-and-esp32-firmware/
Backup with:
esptool.py --port COM3 read_flash 0x0 0x800000 backup.bin
Restore with:
esptool.py --port COM3 write_flash 0x0 backup.bin
https://micropython.org/download/esp32/
esptool.py --chip esp32 --port COM3 erase_flash
esptool.py --chip esp32 --port COM3 --baud 460800 write_flash -z 0x1000 esp32-idf3-20200902-v1.13.bin
pip install rshell
rshell -p COM3
repl
print("Hello World!")
rshell -p COM3 rsync -m code /pyboard/
I tried to get it workign via Docker on Windows and WSL2 but that's not supported yet: https://docs.microsoft.com/en-us/windows/wsl/wsl2-faq#can-i-access-the-gpu-in-wsl-2-are-there-plans-to-increase-hardware-support
As of right now WSL 2 does not include serial support, or USB device support
choco install putty -y
- open putty
- don't go to serial section
- select Serial option in radio buttons
- set Serial line and Speed to
115200
- save profile as
Wifi32
- run
putty -load Wifi32
from CLI to run that profile
If you want to also send messages, also follow this: https://stackoverflow.com/questions/4999280/how-to-send-characters-in-putty-serial-communication-only-when-pressing-enter
- using OLED display: https://randomnerdtutorials.com/micropython-oled-display-esp32-esp8266/
- MakerHawk ESP32 wiring diagram: https://raw.githubusercontent.com/Heltec-Aaron-Lee/WiFi_Kit_series/master/PinoutDiagram/WIFI%20Kit%2032.pdf
Doens't really work because VSCode can't find the libaries used by micropython.
Maybe https://github.com/BradenM/micropy-cli is the answer but I can't get it to work.