Skip to content

Commit

Permalink
vinscant: organize files in lib/ & res/. Boot & main loop cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reavershark authored and hannes-dev committed Aug 12, 2024
1 parent 0aa561e commit d92da45
Show file tree
Hide file tree
Showing 9 changed files with 1,607 additions and 171 deletions.
19 changes: 0 additions & 19 deletions vinscant/boot.py

This file was deleted.

1 change: 0 additions & 1 deletion vinscant/key.txt

This file was deleted.

151 changes: 0 additions & 151 deletions vinscant/main.py

This file was deleted.

29 changes: 29 additions & 0 deletions vinscant/mpfiles/boot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import gc
import machine
import network
import time
import webrepl

network.hostname("vinscant")
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
print("Connecting to WiFi...")
wlan.connect('Zeus WPI', 'zeusisdemax')
while not wlan.isconnected():
pass
print("Connected to WiFi with ifconfig:", wlan.ifconfig())

print("Starting webrepl...")
webrepl.start()
print("Webrepl started")

print("Heap bytes used before GC:", gc.mem_alloc())
gc.collect()
print("Heap bytes used after GC:", gc.mem_alloc())

print("Boot done")

print("Starting watchdog in 1s, interupt now with Ctrl+C")
time.sleep(1)
watchdog = machine.WDT(timeout=10 * 1000)
print("Watchdog started")
Empty file.
File renamed without changes.
9 changes: 9 additions & 0 deletions vinscant/mpfiles/lib/term_color.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Ansi color codes
RESET = "\x1b[0m"
BOLD = "\x1b[1m"
UNDERLINE = "\x1b[4m"
BLACK = "\x1b[30m"
RED = "\x1b[31m"
GREEN = "\x1b[32m"
YELLOW = "\x1b[33m"
BLUE = "\x1b[34m"
Loading

0 comments on commit d92da45

Please sign in to comment.