From a06775cc6c57c7770473e9914950c934121592fc Mon Sep 17 00:00:00 2001 From: yukijx Date: Wed, 31 Jan 2024 18:51:13 -0600 Subject: [PATCH] feat: Output GPS coords to text file --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index cfde983..768439e 100644 --- a/main.py +++ b/main.py @@ -67,6 +67,10 @@ def drive(rover): lights.start() #UDPOut.sendLED(mbedIP, mbedPort, 'g') + f = open("Recorded_Coordinates_"+ args.latLong + ".txt", "a") + f.write("Latitude: " + rover.gps.latitude + "\n Longitude: " + rover.gps.longitude) + f.close() + if __name__ == "__main__": os.chdir(path) print(os.getcwd())