]> apps.delaporte.us Git - dotfiles.git/commitdiff
Fixes
authorEdward Delaporte <edward@delaporte.us>
Tue, 9 Jun 2026 03:44:33 +0000 (22:44 -0500)
committerEdward Delaporte <edward@delaporte.us>
Tue, 9 Jun 2026 03:44:33 +0000 (22:44 -0500)
invoke/esptool/tasks.py

index 454cc47e1f7beef6e7fdef8872a692f8b7c9973e..590d70028d53952191d592322a94c8f74df5da3e 100644 (file)
@@ -6,6 +6,20 @@ import os
 HOME = os.path.expanduser('~')
 TODAY = dt.now().strftime('%Y.%m.%d')
 
 HOME = os.path.expanduser('~')
 TODAY = dt.now().strftime('%Y.%m.%d')
 
+@task
+def help(c):
+    '''
+    - Set the Cardputer Adv power to 'off' state
+    - Plugging in to USB will cause it to boot
+    - Hold 'Go' while booting
+    - Hold 'Go' and press 'Reset' to try again.
+    - On success, the usual screen content still shows up
+    > Tip: Be sure to use a cable that can carry data, not just power.
+
+    '''
+    print(help.__doc__)
+
+
 @task
 def usbdiff(c):
     input('Un-plug in the device...')
 @task
 def usbdiff(c):
     input('Un-plug in the device...')
@@ -16,19 +30,16 @@ def usbdiff(c):
     print(result.stdout)
     # breakpoint()
 
     print(result.stdout)
     # breakpoint()
 
-
-# Set power to 'off' state
-# Hold 'Go' while booting
-
 # Maybe https://thelastoutpostworkshop.github.io/ESPConnect/ in Chromium?
 
 # Maybe https://thelastoutpostworkshop.github.io/ESPConnect/ in Chromium?
 
+DEV='/dev/ttyACM0'
+
 @task
 def listusb(c):
 @task
 def listusb(c):
-    c.run('ls /dev/ttyUSB*')
     c.run('ls /dev/ttyACM*')
     c.run('ls /dev/ttyACM*')
+    # c.run('ls /dev/ttyUSB*')
 
 @task()
 
 @task()
-def status(c):
-
-    c.run('esptool --port /dev/ttyUSB0 chip-id')
+def chip_id(c):
+    c.run(f'esptool --port {DEV} chip-id')