diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..47c02dd Binary files /dev/null and b/.DS_Store differ diff --git a/boot.py b/boot.py index 91135a5..ba015a1 100644 --- a/boot.py +++ b/boot.py @@ -36,3 +36,6 @@ break else: print("Connection could not be made.\n") + +if sta_if.isconnected(): + print("Connected as: {}".format(sta_if.ifconfig()[0])) diff --git a/simple_web_server/main.py b/simple_web_server/main.py index b860471..1998cbb 100644 --- a/simple_web_server/main.py +++ b/simple_web_server/main.py @@ -1,35 +1,62 @@ +import machine +import ntptime +import utime +from machine import RTC +from time import sleep + try: import usocket as socket except: import socket + +response_404 = """HTTP/1.0 404 NOT FOUND + +
%s
- - -""" % str(rtc.datetime()) + +%s
+ +