Skip to content

Commit e6db8d7

Browse files
committed
Tidying up the code and making the splash screen show for longer
1 parent 92bd7ab commit e6db8d7

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

  • PyPortal_Azure_Plant_Monitor

PyPortal_Azure_Plant_Monitor/code.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
# gfx helper
2323
import azure_gfx_helper
2424

25+
# init. graphics helper
26+
gfx = azure_gfx_helper.Azure_GFX(False)
27+
2528
# Get wifi details and more from a secrets.py file
2629
try:
2730
from secrets import secrets
@@ -61,8 +64,7 @@
6164
# Connect to Azure IoT Central
6265
device.connect()
6366

64-
# init. graphics helper
65-
gfx = azure_gfx_helper.Azure_GFX(False)
67+
gfx.show_text()
6668

6769
while True:
6870
try:
@@ -72,7 +74,8 @@
7274
temperature = ss.get_temp()
7375
# display soil sensor values on pyportal
7476
gfx.display_moisture(moisture_level)
75-
temperature = gfx.display_temp(temperature)
77+
gfx.display_temp(temperature)
78+
7679
print('Sending data to Azure')
7780
gfx.display_azure_status('Sending data...')
7881

0 commit comments

Comments
 (0)