lew247 Guru Joined: 23/12/2015 Location: United KingdomPosts: 1702
Posted: 12:48pm 22 Oct 2021
I tried this but I'm not certain it's working the way I want it to I really need to check that the speed is still < 3 at a few stages up to 300000 (5 minutes) That way I know defintely the car has stopped and the speed is definitely zero and I can put the cpu to sleep
I know I could do this simply by wiring it into the car, but I want to do it completely portable so the gps detects when the car is moving and goes to sleep when the car has stopped for 5 minutes
Hope that explained it ok
I'm just not certain my code below will test the speed enough times to know it's stopped.
I used <3 as the speed value because I've been testing the gps for a couple of days and it varies usually under 1mphg, but I've seen it touch 2mph even though the gps receiver is sat on the desk beside me.