No data on SD Card, Data logging shield

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: No data on SD Card, Data logging shield

Post by adafruit_support_mike »

You want the same timing logic used here: http://arduino.cc/en/Tutorial/BlinkWithoutDelay

The basic idea is that you call 'millis()' to keep track of time. Store a timestamp every time you write to the logfile, and keep comparing that to the current time on every pass through the main loop. If it's been more than two seconds since the last write, do a new write and update the timestamp.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”