From: Edward Delaporte Date: Tue, 9 Jun 2026 00:07:06 +0000 (-0500) Subject: WIP esptool commands X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/commitdiff_plain/8cee1ed3b1f7f3c1196956e7e919231c41d18a85?ds=inline WIP esptool commands --- diff --git a/invoke/esptool/tasks.py b/invoke/esptool/tasks.py new file mode 100644 index 0000000..454cc47 --- /dev/null +++ b/invoke/esptool/tasks.py @@ -0,0 +1,34 @@ +from invoke import task + +from datetime import datetime as dt +import os + +HOME = os.path.expanduser('~') +TODAY = dt.now().strftime('%Y.%m.%d') + +@task +def usbdiff(c): + input('Un-plug in the device...') + c.run('lsusb > /tmp/before.txt') + input('Plug in the device...') + c.run('lsusb > /tmp/after.txt') + result = c.run('diff /tmp/before.txt /tmp/after.txt') + print(result.stdout) + # breakpoint() + + +# Set power to 'off' state +# Hold 'Go' while booting + +# Maybe https://thelastoutpostworkshop.github.io/ESPConnect/ in Chromium? + +@task +def listusb(c): + c.run('ls /dev/ttyUSB*') + c.run('ls /dev/ttyACM*') + +@task() +def status(c): + + c.run('esptool --port /dev/ttyUSB0 chip-id') +