Sync micropython files on change over serial
- Python 3
- Watchdog - python filesystem watcher
- Ampy serial fs utility for micropython
- screen - serial client
While currently in your project directory:
sudo pip3 install . --upgrade; userialsync --port /dev/ttys8 --baud 115200 --dir_map '[["public", "www"]]'
uSerialSync will:
- Create a
screen
session with the session namettyS*
- Monitor the project directory for changes to
main.py
orboot.py
- Destroy
screen
session - Upload modified file to the device connected to
ttyS*
- Create a new
screen
session - Restart the device connected to
ttyS*