OpenLog 15164 Example 1 writing empty zero byte files

Hi

I just got this OpenLog 15164 and am using it with a QWIIC-to-Breadboard jumper cable. I’ve tried Example 1 on both my UNO R3 and UNO R4 Minima. It seems to only work on the R4 and just writes a config.txt file and a series of LOG000xx.txt files [one for each boot I assume]. [On the R3 the power LED does not light].

The sketch displays the debugging messages in the serial monitor so I know its working:

OpenLog Write File Test

This goes to the terminal

Done!

Why the zero byte log files? Can I have the wrong library or is there an update to make the “myLog.println(“This goes to the log file”);” etc work?

Anybody got Example 1 to work on a R4 Minima?

Thanks

Johnny7

Ok, noob here but I did muddle through and will share what I learned for other noobs.

  1. These next few lines are critical to WAITING until the serial etc connection is made, otherwise the sketch will finish before its even connected with the serial monitor!

while(!Serial);

while(!SerialUSB);

etc.

  1. The other thing I learned is the RedBoard Turbo is so fast that some of the data being written to the SD card gets dropped. I noticed single characters occasionally missing from the LOGxxx.txt file.

You need to add a 30 nanosecond delay to the SparkFun_Qwiic_OpenLog_Arduino_Library.cpp library file.

See the thread “OPENLOG QWIIC AND I2C SENSORS - RANDOM DATA LOSS” #237807.

This fixed my dropped data.

Johnny