From b552e419c223576cb54f0292400768cf2eae3386 Mon Sep 17 00:00:00 2001 From: Matthew Wilkes Date: Tue, 31 May 2022 16:44:13 +0200 Subject: [PATCH] Accelerometer on 4 lines in post --- modules/post.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/post.py b/modules/post.py index f73b863..a57d41f 100644 --- a/modules/post.py +++ b/modules/post.py @@ -104,7 +104,10 @@ def on_activate(self): window.println(f"Wifi: {wifi.get_sta_status()}") window.println(f"IP: {wifi.get_ip()}") try: - pos = accelerometer.get_xyz() + x,y,z = accelerometer.get_xyz() except OSError: - pos = None - window.println(f"Accel: {pos}") + x = y = z = None + window.println("Accel") + window.println(f"X: {x}") + window.println(f"Y: {y}") + window.println(f"Z: {z}")