Skip to content

Commit 92fd826

Browse files
committed
Modify examples to facilitate I2C bus testing
1 parent ed780ea commit 92fd826

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Firmware/Test Sketches/GNSS_GetPosition/GNSS_GetPosition.ino

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,22 @@ long lastTime = 0; //Simple local timer. Limits amount of I2C traffic to u-blox
2121
void setup()
2222
{
2323
Serial.begin(115200);
24-
delay(500);
24+
delay(1000);
2525
Serial.println("u-blox high precision example");
2626

2727
Wire.begin();
28+
//Wire.setClock(400000);
2829

2930
//i2cGNSS.enableDebugging(Serial); // Uncomment this line to enable debug messages
3031

3132
if (i2cGNSS.begin() == false) //Connect to the u-blox module using Wire port
3233
{
3334
Serial.println(F("u-blox GNSS not detected at default I2C address. Please check wiring. Freezing."));
34-
while (1) ;
35+
while (1)
36+
{
37+
if(Serial.available()) ESP.restart();
38+
delay(10);
39+
}
3540
}
3641

3742
i2cGNSS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise)
@@ -92,4 +97,6 @@ void loop()
9297

9398
Serial.println();
9499
}
100+
101+
if(Serial.available()) ESP.restart();
95102
}

Firmware/Test Sketches/GNSS_Serial_Test/GNSS_Serial_Test.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ void setup()
2626
Serial.println("GNSS UART2 Connection Test");
2727

2828
Wire.begin();
29+
//Wire.setClock(400000);
2930

3031
if (i2cGNSS.begin() == false) //Connect to the u-blox module using Wire port
3132
{
3233
Serial.println(F("u-blox GNSS not detected at default I2C address. Trying again"));
3334

34-
//The ESP32 controls the power to the ZED. During power cycles, the ZED can take up to ~1000ms to respond to I2C pings.
35+
//On the RTK Facet the ESP32 controls the power to the ZED. During power cycles, the ZED can take up to ~1000ms to respond to I2C pings.
3536
//delay(400); //Bad
3637
delay(500); //Good - may be a combination of startup delay of 200ms
3738

0 commit comments

Comments
 (0)