When my Asset Tracker electron only sleeps for a few seconds up to 1-2 minutes, all is fine and my code below works. If it stays in sleep mode for longer than this time however, it will wake-up on move, and go back to permanent sleep within several seconds.
It used to work just fine; the only piece of code I have really changed is adding
digitalWrite(D6, HIGH); pinMode(D6, INPUT);
to Reset_State, and:
digitalWrite(D6, LOW); pinMode(D6, OUTPUT);
to GPS_wait_state, as I was having issues with the GPS staying enabled throughout System.sleep. Any thoughts? Is this a correct way of disengaging the GPS during sleep?