Browse Source

Connect to wifi and run server on boot

master
Elis Hirwing 6 months ago
parent
commit
06a265f3ac
Signed by: Elis Hirwing <elis@hirwing.se> GPG Key ID: D57EFA625C9A925F
2 changed files with 17 additions and 0 deletions
  1. 1
    0
      Makefile
  2. 16
    0
      src/boot.py

+ 1
- 0
Makefile View File

@@ -1,6 +1,7 @@
DEVICE := /dev/ttyUSB3

copy:
ampy --port $(DEVICE) put src/boot.py
ampy --port $(DEVICE) put src/csms12.py
ampy --port $(DEVICE) put src/main.py


+ 16
- 0
src/boot.py View File

@@ -0,0 +1,16 @@
# Original file:
# This file is executed on every boot (including wake-boot from deepsleep)
#import esp
#esp.osdebug(None)
import uos, machine
#uos.dupterm(None, 1) # disable REPL on UART(0)
import gc
#import webrepl
#webrepl.start()
gc.collect()

# My additions:
import main

main.connect()
main.server()

Loading…
Cancel
Save