Serial.print(longitude);
Serial.print('\t');
Serial.println(altitude);
myFile.close();
}
else // GPS is looking for satellites, waiting on fix
{
uint8_t SIV = myGPS.getSIV();
Serial.print("Satellites in view: ");
Serial.println(SIV);
}
}
}
115200
.
The code will print out if the SD card or GPS do not initialize properly. If the SD initialization fails, check that the
card is inserted and locked and that it is formatted to FAT32. If the GPS initialization fails, check the connection to
your GPS board or verify it is at the default I C address.
If everything initializes properly, the code will open the "data.txt" file and begin logging data once the GPS has a fix
and will also print the same data over serial. If the GPS does not have a lock, the code will print out the number of
satellites in view over serial.
Power Control Examples
In addition to this GPS example, we've written two example sketches specifically for the Data Logging Carrier
Board demonstrating how to control the
3.3V
regulators powering the Qwiic connector/G2-3V3 pin and G1-3V3
rail. They can be found in the MicroMod Data Logging Carrier Board GitHub Repo or you can download the Zip of
the repository by clicking the button below
DATA LOGGING CARRIER BOARD TEST SKETCHES (ZIP)
Take note both Qwiic and 3V3 peripheral power are controlled with a P-Channel MOSFET so the logic is reversed
(Power ON =
LOW
and Power OFF =
HIGH
).
Troubleshooting
Need help?
If your product is not working as you expected or you need technical assistance or information, head on over
to the SparkFun Technical Assistance page for some initial troubleshooting.
SPARKFUN TECHNICAL ASSISTANCE PAGE
If you don't find what you need there, the SparkFun Forums are a great place to find and ask for help. If this
is your first visit, you'll need to create a Forum Account to search product forums and post questions.
2