@@ -40,12 +40,6 @@ SARA_R5 mySARA;
4040// Change the pin number if required.
4141// SARA_R5 mySARA(34);
4242
43- // If you're using the MicroMod Asset Tracker then we need to define which pin controls the active antenna power for the GNSS.
44- // If you're using the MicroMod Artemis Processor Board, the pin name is G6 which is connected to pin D14.
45- // Change the pin number if required.
46- // const int antennaPowerEnablePin = 14; // Uncomment this line to define the pin number for the antenna power enable
47- const int antennaPowerEnablePin = -1 ; // Uncomment this line if your board does not have an antenna power enable
48-
4943PositionData gps;
5044SpeedData spd;
5145ClockData clk;
@@ -86,7 +80,9 @@ void setup()
8680 }
8781
8882 // Enable power for the GNSS active antenna
89- enableGNSSAntennaPower ();
83+ // On the MicroMod Asset Tracker, the SARA GPIO2 pin is used to control power for the antenna.
84+ // We need to pull GPIO2 (Pin 23) high to enable the power.
85+ mySARA.setGpioMode (mySARA.GPIO2 , mySARA.GPIO_OUTPUT , 1 );
9086
9187 // From the u-blox SARA-R5 Positioning Implementation Application Note UBX-20012413 - R01
9288 // To enable the PPS output we need to:
@@ -147,22 +143,3 @@ void printGPS(void)
147143 Serial.println (" Mode: " + String (gps.mode ));
148144 Serial.println ();
149145}
150-
151- // Disable power for the GNSS active antenna
152- void disableGNSSAntennaPower ()
153- {
154- if (antennaPowerEnablePin >= 0 )
155- {
156- pinMode (antennaPowerEnablePin, OUTPUT);
157- digitalWrite (antennaPowerEnablePin, LOW);
158- }
159- }
160- // Enable power for the GNSS active antenna
161- void enableGNSSAntennaPower ()
162- {
163- if (antennaPowerEnablePin >= 0 )
164- {
165- pinMode (antennaPowerEnablePin, OUTPUT);
166- digitalWrite (antennaPowerEnablePin, HIGH);
167- }
168- }
0 commit comments