sparkfun / OpenLog

Open Source Hardware Datalogger
https://www.sparkfun.com/products/9530
Other
547 stars 215 forks source link

OpenLog examples just not working for me #255

Open kee opened 9 months ago

kee commented 9 months ago

Subject of the issue

The OpenLog Example code does not seem to work as advertised.

Your workbench

Steps to reproduce

Tell us how to reproduce this issue. Please post stripped down example code demonstrating your issue to a gist. Tried your sample code, kinda expected it to work. Example1_WritingLog did not seem to actually write anything to "the" log. Example3_CreateFile also did not create a file of the name defined by me.

Something did create a config.txt file on the microSD. I have no code that tells it to do that.

On power up it is creating log files LOG00148.TXT, then LOG00149.TXT, etc. and I have no code set to create LOGnnnnn.TXT files so am not sure where that is coming from either. The log files are zero bytes and your example code gives me no way to specify which file the log data should get written into.

Expected behavior

Tell us what should happen Kinda expected the Example1 and Example3 sample code to work as advertised. Now that the microSD card has three files on it that I did not create, but that your example code seems to have created, figured I try Example7_ReadDirectoryContents and see if it produced the same list of files I can see when the microSD is visible to my Mac. But: 17:13:10.942 -> OpenLog Read Directory Test 17:13:10.942 -> List of things in this directory: 17:13:10.974 -> Done! The example code cannot see the files that I can see.

Actual behavior

Tell us what happens instead Instead, zero byte LOGnnnnn.TXT files are getting created sequentially and none of the sample code you've provided seems to actually work as expected. Is anyone able to get this working?

I did change the 32GB microSD card name to "WETBULB" and in case that was the problem, when I got the 16GB microSD, I left its name as "NO NAME". Again, doesn't seem to have had an effect.