add wake up time
@@ -51,6 +51,11 @@ and password in a secrets.py file on the CIRCUITPY drive.')
info_font = cwd+"/fonts/Nunito-Black-17.bdf"
time_font = cwd+"/fonts/Nunito-Light-75.bdf"
+# Type in time to get up
+input_wake_up_time = "6:30"
+input_wake_up_time_text = "Wake up at: " + input_wake_up_time + "am"
+#light_on_time_text = "Light starting at: " # - 30 minutes? how?
+
# create text object group
text_group = displayio.Group(max_size=6)
text_group.append(text_group)
@@ -58,15 +63,28 @@ text_group.append(text_group)
print('loading fonts...')
glyphs = b'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-,.:/ '
+# Font for time
time_font = bitmap_font.load_font(time_font)
time_font.load_glyphs(glyphs)
+# Font for other info
+info_font = bitmap_font.load_font(info_font)
+info_font.load_glyphs(glyphs)
+
# Time
time_text = Label(time_font, max_glyphs=40)
time_text.x = 65
time_text.y = 120
text_group.append(time_text)
+
+# Wake up time
+wakeup_time_text = Label(info_font, text= input_wake_up_time_text)
+wakeup_time_text.x = 15
+wakeup_time_text.y = 200
+text_group.append(wakeup_time_text)
+
board.DISPLAY.show(time_text)
+# board.DISPLAY.show(text_group) # when running this line, the pyportal crashes
# Create an instance of the Adafruit IO REST client
io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi)
