Go Down

Topic: WANT TO LOG DATA TO SD CARD FOR 60SECONDS.  (Read 191 times) previous topic - next topic



I am new to arduino programming still in the learning phase i need a little some help.

I actually have two sensors one is heart rate sensor and the other is gsr sensor I want to log the data of both the sensors to a .csv file on a sd card for 62 seconds. I want post the data of every ,millisecond with the time stamp.

I am able to post the data to the file, but not able to take only for 62 seconds.

Can you help me with it ?

Using what exactly can i do this ?

Please also feel free to post the links related to this.

I need it soon for the project.

Thanking you.


As you claim to be able to generate the required output, you could use something like

Code: [Select]
uint32_t actionStarted;
bool done;

void setup() {
  // open file
  actionStarted = millis();

void loop() {
  if (millis() - actionStarted >= 62000UL) {
    done = true;
    // close file
  if (!done) {
    // write to file
Ah, this is obviously some strange usage of the word 'safe' that I wasn't previously aware of. (D.Adams)

Go Up