Hi All,
I'm not a complete arduino noob, but not far off, so forgive me if I'm making a stupid error here.
I have the TinyDuino 9axis IMU shield and Micro SD shield, and would like to log the data from the IMU to a Micro SD card.
The problem I'm having is that the 9axis IMU library seems to assume that data will be output on Serial.print. I need to output on dataFile.print to go to a MicroSD. I have tried modifying the library files a bit, but without too much success. I end up chasing my tail.
Basically, I want a combination between the Arduino 'Datalogger' example and the "TinyShield_9_Axis" example.
Thing is, these lines in "TinyShield_9_Axis" are just outputting on serial:
RTMath::display("Gyro:", (RTVector3&)imu->getGyro()); // gyro data
RTMath::display("Accel:", (RTVector3&)imu->getAccel()); // accel data
RTMath::display("Mag:", (RTVector3&)imu->getCompass()); // compass data
It seems when you trace these back to RTMath.cpp, they refer to
void RTMath::display(const char *label, RTVector3& vec)
{
Serial.print(label);
Serial.print(" x:"); Serial.print(vec.x());
Serial.print(" y:"); Serial.print(vec.y());
Serial.print(" z:"); Serial.print(vec.z());
}
I have tried modifying RTMath.cpp and changing Serial.print to dataFile.print, but of course it then requires SD.h which it doesn't see.
Can anyone help me here? I may well be going about this completely the wrong way.
Has anyone successfully written 9axis shield data to a MicroSD?
Many thanks
tinyvino