#!/bin/sh # Die Projektdateien auf den XIAO ESP32-C3 kopieren. # # ./deploy.sh # alle Dateien kopieren # ./deploy.sh /dev/cu.usbmodem1101 # anderen Port erzwingen # # Braucht mpremote: pip install mpremote # Danach am REPL (mpremote repl, mit Ctrl-] wieder raus): # # import run_esp32 # run_esp32.main() set -e PORT="${1:-auto}" # Alles, was auf dem Geraet gebraucht wird. run_display.py, show_coords.py, # probe.py, mount_mock.py und die Tests bleiben auf dem Mac -- sie brauchen # argparse bzw. threading. FILES=" ticks.py migra.py config.py transport.py display.py coords.py lx200.py mount_client.py brightness.py displayloop.py wifi.py run_esp32.py " if [ ! -f wifi_config.py ]; then echo "wifi_config.py fehlt." >&2 echo " cp wifi_config_example.py wifi_config.py und ausfuellen" >&2 exit 1 fi for f in $FILES wifi_config.py; do echo "-> $f" mpremote connect "$PORT" fs cp "$f" ":$f" done echo echo "Fertig. Starten mit:" echo " mpremote connect $PORT repl" echo " >>> import run_esp32" echo " >>> run_esp32.main()"