Go Down

Topic: Issue with SDfat Lib  (Read 127 times) previous topic - next topic


Mar 31, 2019, 09:03 pm Last Edit: Mar 31, 2019, 09:06 pm by Diesel77
G'day all,

I'm trying to implement a load cell using the HX711 breakout board from Sparkfun with an SD Card to save the data. My ultimate goal is to record at 60 samples per second. I've bridged the breakout to get the faster 80sps from the HX711. (attached code and data was logging at only 50 sps). In order to save the data at this speed I've used the SDfat lib to achieve a faster recording rate.  The SDcard shield i'm using is the Adafruit Sd Card Shield and I'm using an Arduino Uno R3 to implement it all.

I'm very new to the SDfat lib (I found it two days ago) and have essentially just been modifying the  "datalogger" program for my specific case.

Specific Problem:
The issue that I'm having is that what is saved to my SD card doesn't seem to agree with reality. What I mean is, I ran a test for about 5 minutes, yet only ~60 seconds of data was recorded. I've tried multiple times to see if I just got a strange one-off but it always seems to do the same thing. I'm hoping someone could take a look and see if there's an error in my logic or implementation?

Sd Card Shield - https://www.adafruit.com/product/1141
HX711 Breakout board - https://www.sparkfun.com/products/13879
SDFat lib - https://github.com/greiman/SdFat

Description of attached Files:
Power_RecorderV4.1 <- Sketch I used
Words23.csv <- a horribly named output file, actual recorded time ~5 minutes, recorded time ~1 minute
** I changed the extension from Words23.csv to Words23.txt so that I could upload, no other changes to the file though


For anyone who comes looking at this, the problem, was that I wasn't saving the record time, but saving the save interval. It actual was recording at the proper rate. Oops

Go Up