File tree Expand file tree Collapse file tree
PyPortal_Azure_Plant_Monitor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ def __init__(self, is_celsius):
5656 self .temp_label .y = 65
5757 self ._text_group .append (self .temp_label )
5858
59- self .temp_text = Label (self .data_font , max_glyphs = 10 , text = "" )
59+ self .temp_text = Label (self .data_font , max_glyphs = 10 )
6060 self .temp_text .x = 200
6161 self .temp_text .y = 85
6262 self ._text_group .append (self .temp_text )
@@ -66,12 +66,12 @@ def __init__(self, is_celsius):
6666 self .moisture_label .y = 135
6767 self ._text_group .append (self .moisture_label )
6868
69- self .moisture_text = Label (self .data_font , max_glyphs = 10 , text = "" )
69+ self .moisture_text = Label (self .data_font , max_glyphs = 10 )
7070 self .moisture_text .x = 200
7171 self .moisture_text .y = 175
7272 self ._text_group .append (self .moisture_text )
7373
74- self .azure_status_text = Label (self .main_font , max_glyphs = 15 , text = "" )
74+ self .azure_status_text = Label (self .main_font , max_glyphs = 15 )
7575 self .azure_status_text .x = 65
7676 self .azure_status_text .y = 225
7777 self ._text_group .append (self .azure_status_text )
Original file line number Diff line number Diff line change 4242# Set up the WiFi manager with a status light to show the WiFi connection status
4343status_light = neopixel .NeoPixel (board .NEOPIXEL , 1 , brightness = 0.2 )
4444wifi = adafruit_esp32spi_wifimanager .ESPSPI_WiFiManager (esp , secrets , status_light )
45+ print ("WiFi connecting..." )
4546wifi .connect ()
47+ print ("WiFi connected!" )
4648
4749# Time setup, needed to authenticate with Azure IoT Central
4850ntp = NTP (esp )
4951while not ntp .valid_time :
52+ print ("Failed to obtain time, retrying in 5 seconds..." )
5053 time .sleep (5 )
5154 ntp .set_time ()
5255
You can’t perform that action at this time.
0 commit comments