← Back to ratslair.com
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DWM.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/DWM.py b/DWM.py
index a7c0a97..86cb07e 100644
--- a/DWM.py
+++ b/DWM.py
@@ -48,6 +48,10 @@ with serial.Serial('/dev/ttyACM0', 115200, timeout = 1) as s:
str = f"{s.readline().decode('utf-8').strip('\n')}"
if "apg: x:" in str:
- print(str.replace("apg: ", ""))
+ str = str.replace("apg: ", "")
+ print(str)
+ with open("posititon.txt", "w") as f:
+ f.write(str + '\n')
+ f.close()
print("Shutting down serial communication")