← Back to ratslair.com
aboutsummaryrefslogtreecommitdiff
path: root/DWM.py
diff options
context:
space:
mode:
authorEdvin <[email protected]>2025-04-11 15:45:10 +0200
committerEdvin <[email protected]>2025-04-11 15:45:10 +0200
commit786cc4007e4dca597870b4472679c18cd5635458 (patch)
tree9f335f69617e1bb8c263928edf7cfb87f827d158 /DWM.py
parentfbb776810537513b992cd777db21246b9afc30ad (diff)
Lets the DWM1001 store position in text file
Diffstat (limited to 'DWM.py')
-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")