Hi, I am having a problem when logging data to a micro sd card using the Qwiic OpenLog and a redboard turbo. I am using the SparkFun example 1 for the Qwiic OpenLog. the code is here: https://github.com/sparkfun/SparkFun_Qw … ingLog.ino. When I run the program and wait for it to complete, then disconnect power, remove the micro sd card and insert it my computer, the log file has some of the characters randomly dropped. I ran the program multiple times with the same result. I also tried other examples in the githup repo, but with the same result. I tried changing the program to loop printing “Hello World!” 10 times. My code is here:
#include <Wire.h>
#include "SparkFun_Qwiic_OpenLog_Arduino_Library.h"
OpenLog myLog;
const byte OpenLogAddress = 42;
int ledPin = 13; //Status LED connected to digital pin 13
void setup(){
pinMode(ledPin, OUTPUT);
Wire.begin();
myLog.begin();
for (int i=0; i<10; i++)
myLog.println("Hello World!");
myLog.syncFile();
}
void loop(){
digitalWrite(ledPin, HIGH);
delay(100);
digitalWrite(ledPin, LOW);
delay(1000);
}
And the results logged on the micro sd card looked like this:
Hello Wrld!
Hello World!
Helo World!
Hello Wold!
Hello World!
Hello World!
Hello World!
Hello Worl!
Hello World!
Hello World!
As the results show, some characters in the logged data were randomly dropped. The code was supposed to print “Hello World!” 10 times, but some lines said things like “Hello Wrld!” and “Helo World!”
Please let me know what I am doing wrong. Thanks for your time.