@@ -40,12 +40,6 @@ SARA_R5 mySARA;
40
40
// Change the pin number if required.
41
41
// SARA_R5 mySARA(34);
42
42
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
-
49
43
PositionData gps;
50
44
SpeedData spd;
51
45
ClockData clk;
@@ -86,7 +80,9 @@ void setup()
86
80
}
87
81
88
82
// 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 );
90
86
91
87
// From the u-blox SARA-R5 Positioning Implementation Application Note UBX-20012413 - R01
92
88
// To enable the PPS output we need to:
@@ -147,22 +143,3 @@ void printGPS(void)
147
143
Serial.println (" Mode: " + String (gps.mode ));
148
144
Serial.println ();
149
145
}
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