Skip to content

harvzor/scrobbler-arduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Scrobbler Arduino

An Arduino device which allows for easy scrobbling of things.

Language

Decided to use MicroPython since whatever abomination of C++ sub or superset that Arduino normally uses is a huge pain to work with.

Getting started

I'm using the MakerHawk ESP32 board.

Env vars

You'll want to define variables in the env.py file, something like:

wifi_ssid = '<ssid>'
wifi_password = '<password>'

MicroPython

  1. install Python choco install python3 -y
  2. check python and pip are in your PATH
  3. install tool with pip install esptool
  4. verify installation with esptool.py -h (I had to find that file and add a another PATH var to it)

Backup / restore

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 

Flashing MicroPython

https://micropython.org/download/esp32/

  1. esptool.py --chip esp32 --port COM3 erase_flash
  2. esptool.py --chip esp32 --port COM3 --baud 460800 write_flash -z 0x1000 esp32-idf3-20200902-v1.13.bin

Connect to REPL with rshell

  1. pip install rshell
  2. rshell -p COM3
  3. repl
  4. print("Hello World!")

Syncing code to the board

rshell -p COM3 rsync -m code /pyboard/

Serial monitor

Docker

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

Putty

  1. choco install putty -y
  2. open putty
  3. don't go to serial section
  4. select Serial option in radio buttons
  5. set Serial line and Speed to 115200
  6. save profile as Wifi32
  7. 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

Docs

Intellisense

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages