style(examples):Flip display vertically (back to default)
[EVA-2020-02-2.git] / examples / all-in-one-enviro-mini-bk.py
index 5a3dc82a83d7d89ad9b34f5951af62911f7b67a8..bff5497ed41360cecb9b9734ef7f9a7aa7ef6f9e 100755 (executable)
@@ -45,8 +45,8 @@ st7735 = ST7735.ST7735(
     cs=1,
     dc=9,
     backlight=12,
-    #rotation=270,
-    rotation=90,
+    rotation=270,
+    #rotation=90, # flip upside down wrt enviro+ default orientation
     spi_speed_hz=10000000
 )
 
@@ -402,8 +402,10 @@ try:
     # schedule.every().minute.at(":45").do(updateBuffer)
     # schedule.every().minute.at(":50").do(updateBuffer)
     # schedule.every().minute.at(":55").do(updateBuffer)
+    pollSensors() # initial run to start up sensors
+    time.sleep(1) # pause to give sensors time to initialize
     updateBuffer() # initial run
-    pollSensors() # initial run
+
     while True:
         proximity = ltr559.get_proximity()