Skip to content

Commit

Permalink
sleep gnss for 1h
Browse files Browse the repository at this point in the history
  • Loading branch information
gauteh committed Jun 3, 2024
1 parent 7dc68be commit d0eb11e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/board_control.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "board_control.h"
#include "gnss_manager.h"

TwoWire ArtemisWire(i2c_port_number);
TwoWire GnssWire(3);
Expand Down Expand Up @@ -44,13 +45,18 @@ void turn_gnss_on(void){
Serial.println(F("turn gnss on"));
turn_iridium_off();
delay(100);
// https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library/blob/main/examples/Example22_PowerOff/Example22_PowerOff.ino
pinMode(gnssEN, OUTPUT); // Configure the pin which enables power for the ZOE-M8Q GNSS
digitalWrite(gnssEN, LOW); // Enable GNSS power (HIGH = disable; LOW = enable)
digitalWrite(gnssEN, LOW);
delay(1000);
digitalWrite(gnssEN, HIGH);
delay(1000);
digitalWrite(gnssEN, LOW);
}

void turn_gnss_off(void){
Serial.println(F("turn gnss off"));
gnss.powerOff(60 * 60 * 1000); // sleep for 1 hour
pinMode(gnssEN, OUTPUT);
digitalWrite(gnssEN, HIGH); // Disable GNSS power (HIGH = disable; LOW = enable)
delay(10);
Expand Down

0 comments on commit d0eb11e

Please sign in to comment.