From 06a265f3acfe02bb8de56d466f70314f42fc6266 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Sun, 19 May 2019 10:58:10 +0200 Subject: [PATCH] Connect to wifi and run server on boot --- Makefile | 1 + src/boot.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 src/boot.py diff --git a/Makefile b/Makefile index 2a2b9fe..5c34119 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/src/boot.py b/src/boot.py new file mode 100644 index 0000000..9780f0e --- /dev/null +++ b/src/boot.py @@ -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()