The code I used worked: /* Read/write SD card This example shows how to read and write data to and from an SD card file Schematic: An SD card is created as follows with connected to the SPI bus ** MOSI - pin 11 ** MISO - pin 12 ** CLK - pin 13 ** CS - pin 4 (for MKRZero SD: SDCARD_SS_PIN) created November 2010 by David A. Mellis and modified November 9, 2010. April 2012 by Tom Egoe. public domain.*/#include <SPI.h>#include <SD.h>//chipSelect = 53 for ArduinoMega//const int chipSelect = 53;const int chipSelect = 10;File myFile;void setup() { / / Open the serial communication and wait for the port to open: Serial.begin(9600); while (! serial) { ; // wait for serial port connection. Only required for native USB port } Serial.print("Initialize SD card."); if (!SD.begin(chipSelect)) {Serial.println("Initialization failed!"); during (1); } Serial.println("Initialization complete."); // Open file. Note that only one file can be open at a time, // so you must close that file before opening another. myFile = SD.open("test.txt", FILE_WRITE); // If the file opened normally, write in it: if (myFile) { Serial.print ("Write to test.txt."); myFile.println("test 4, 5, 6."); myFile.println("Sent via Arduino Mega."); // close file: myFile.close(); Serial.println("Done."); } Else { // If the file didn't open, print an error: Serial.println ("failed to open test.txt"); } // Open file again for reading: myFile = SD.open("test.txt"); if (myfile) {Serial.println("test.txt"); // read from the file until there is nothing left: while (myFile.available()) { Serial.write(myFile.read()); } // close file: myFile.close(); } Else { // If the file didn't open, print an error: Serial.println ("failed to open test.txt"); }}void loop() { // nothing happens after installation} Make sure you import data from GPS++ from their github and not from Arduino libraries. It also takes some time to actually get the location data. I had to be outside in low cloud to get the data and it took a few minutes. It also seems to be getting a fairly accurate altitude, but I'm not sure how accurate it is or why it's taking about 10 minutes to get the altitude even though it's getting longitude and latitude data.
REXQualis Comprehensive Starter Kit with Arduino MEGA 2560 & Detailed Tutorial for Arduino IDE Compatibility
11 Review
π MCIGICM 2 Channel DC 5V Relay Module: Optocoupler Low Level Trigger Expansion Board for Arduino UNO R3, DSP, ARM, PIC, AVR, STM32, Raspberry Pi
11 Review
55" TV LG OLED55C2RLA 2022 HDR, OLED, dark titanium
38 Review
π Ultimate BBC Micro bit Sensor Starter Kit: Keyestudio 37-in-1 Box with Tutorial, Compatible with V1.5 & V2, Gift for Kids and Adults (Microbit Board Not Included)
11 Review
Glarks 660 Pieces Phillips Assortment Motherboard
10 Review
M.2 Screw Kit: Easy Mounting for NVMe SSDs on ASUS Motherboards
19 Review
Comprehensive 500pcs Laptop Screw Kit Set for π© IBM HP Dell Lenovo Samsung Sony Toshiba Gateway Acer
12 Review
π₯οΈ Helifouner 450-Piece Computer Standoffs Spacer Screws Kit: Ideal for Hard Drive, Motherboard, Fan, Power Graphics & Computer Cases
10 Review