diff options
| author | Edvin <[email protected]> | 2025-04-11 15:45:10 +0200 |
|---|---|---|
| committer | Edvin <[email protected]> | 2025-04-11 15:45:10 +0200 |
| commit | 786cc4007e4dca597870b4472679c18cd5635458 (patch) | |
| tree | 9f335f69617e1bb8c263928edf7cfb87f827d158 /DWM.py | |
| parent | fbb776810537513b992cd777db21246b9afc30ad (diff) | |
Lets the DWM1001 store position in text file
Diffstat (limited to 'DWM.py')
| -rw-r--r-- | DWM.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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") |
