Go Down

Topic: help with sd card and asxl345 6dof (Read 394 times) previous topic - next topic

lalaz

hi all, please i need help with how to arrange the code to save data to the sd card. i am using adxl345 6dof accelerometer and it is working fine on its own, and also the sdfat library exmple for readwritesdfat is also working seperatly. i need to combine these codes so i can save data to the sd card.


what i did
    void loop(){
   
  int x,y,z; 
  adxl.readAccel(&x, &y, &z); //read the accelerometer values and store them in variables  x,y,z

  // Output x,y,z values - Commented out
  myFile.print(x);
  myFile.print(y);
  myFile.println(z);
  delay(1000);

thanks

Erdin

Could you read this, http://arduino.cc/forum/index.php/topic,149023.0.html ?

Place your code between code tags.
Please give links (just copy the url in the text) to the code and examples that you used.
Please give a link to your 6DOF board.
Please upload your whole sketch.

What is not working ? Is a file created ? Do you close the file after writing ? How would you want to write the data to the file, as binary or as readable text ?

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy