Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Commit 7fb8568

Browse files
committed
Rename examples
1 parent 5b019f9 commit 7fb8568

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

examples/NEO-M8P-2/Example3_EnableRTCM/Example3_EnableRTCM.ino renamed to examples/NEO-M8P-2/Example1_EnableRTCM/Example1_EnableRTCM.ino

+5-6
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,27 @@ void setup()
3434
Serial.println("Ublox RTCM Enable Example");
3535

3636
Wire.begin();
37+
Wire.setClock(400000); //Increase I2C clock speed to 400kHz
3738

38-
myGPS.begin(Wire); //Connect to the Ublox module using Wire port
39-
if (myGPS.isConnected() == false)
39+
if (myGPS.begin() == false) //Connect to the Ublox module using Wire port
4040
{
4141
Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing."));
4242
while (1);
4343
}
4444

45-
Wire.setClock(400000); //Increase I2C clock speed to 400kHz
46-
4745
while(Serial.available()) Serial.read(); //Clear any latent chars in serial buffer
4846
Serial.println("Press any key to send commands to enable RTCM 3.x");
4947
while(Serial.available() == 0) ; //Wait for user to press a key
5048

49+
myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise)
50+
myGPS.saveConfiguration(); //Save the current settings to flash and BBR
51+
5152
boolean response = true;
5253
response &= myGPS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_I2C, 1); //Enable message 1005 to output through I2C port, message every second
5354
response &= myGPS.enableRTCMmessage(UBX_RTCM_1077, COM_PORT_I2C, 1);
5455
response &= myGPS.enableRTCMmessage(UBX_RTCM_1087, COM_PORT_I2C, 1);
5556
response &= myGPS.enableRTCMmessage(UBX_RTCM_1230, COM_PORT_I2C, 10); //Enable message every 10 seconds
5657

57-
myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise)
58-
5958
if (response == true)
6059
{
6160
Serial.println("RTCM messages enabled");

examples/NEO-M8P-2/Example4_StartRTCMBase/Example4_StartRTCMBase.ino renamed to examples/NEO-M8P-2/Example2_StartRTCMBase/Example2_StartRTCMBase.ino

+4-3
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@ void setup()
3636
Serial.println("Ublox NEO-M8P-2 base station example");
3737

3838
Wire.begin();
39+
Wire.setClock(400000); //Increase I2C clock speed to 400kHz
3940

40-
myGPS.begin(); //Connect to the Ublox module using Wire port
41-
if (myGPS.isConnected() == false)
41+
if (myGPS.begin() == false) //Connect to the Ublox module using Wire port
4242
{
4343
Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing."));
4444
while (1);
4545
}
4646

47-
Wire.setClock(400000); //Increase I2C clock speed to 400kHz
47+
myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise)
48+
myGPS.saveConfiguration(); //Save the current settings to flash and BBR
4849

4950
while (Serial.available()) Serial.read(); //Clear any latent chars in serial buffer
5051
Serial.println("Press any key to send commands to begin Survey-In");

examples/ZED-F9P/Example1_GetPositionAccuracy/Example1_GetPositionAccuracy.ino

+8-5
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ void setup()
4141
Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing."));
4242
while (1);
4343
}
44+
45+
myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise)
46+
myGPS.saveConfiguration(); //Save the current settings to flash and BBR
4447
}
4548

4649
void loop()
@@ -50,22 +53,22 @@ void loop()
5053
if (millis() - lastTime > 1000)
5154
{
5255
lastTime = millis(); //Update the timer
53-
54-
long latitude = myGPS.getLatitude(1000);
56+
57+
long latitude = myGPS.getLatitude();
5558
Serial.print(F("Lat: "));
5659
Serial.print(latitude);
5760

58-
/*long longitude = myGPS.getLongitude();
61+
long longitude = myGPS.getLongitude();
5962
Serial.print(F(" Long: "));
6063
Serial.print(longitude);
6164
Serial.print(F(" (degrees * 10^-7)"));
6265

6366
long altitude = myGPS.getAltitude();
6467
Serial.print(F(" Alt: "));
6568
Serial.print(altitude);
66-
Serial.print(F(" (mm)"));*/
69+
Serial.print(F(" (mm)"));
6770

68-
long accuracy = myGPS.getPositionAccuracy(1000);
71+
long accuracy = myGPS.getPositionAccuracy();
6972
Serial.print(F(" 3D Positional Accuracy: "));
7073
Serial.print(accuracy);
7174
Serial.println(F("mm"));

0 commit comments

Comments
 (0)