Jump to content
I2Cdevlib Forums

db52174

Members
  • Posts

    1
  • Joined

  • Last visited

db52174's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, I have been playing around with the MPU-6050 over past few weeks and have successfully got it to output to the Teapot demo thanks to the excellent library code provided by Jeff Rowberg and the wealth of information available on the internet. I am interested in logging the data from the sensor onto an SD card, I have been experimenting with the SD library and have successfully managed to log the YPR data and also the data directly from the FIFO buffers. However I then want to transfer this data from the SD card to the processing Teapot demo to provide an animation of the sensor movement. So in effect the teapot demo animation will be using previously recorded data instead of real time data. The arduino code for the teapot output takes the data from the FIFO buffer to transmit to the processing teapot demo in real time. #ifdef OUTPUT_TEAPOT // display quaternion values in InvenSense Teapot demo format: teapotPacket[2] = fifoBuffer[0]; teapotPacket[3] = fifoBuffer[1]; teapotPacket[4] = fifoBuffer[4]; teapotPacket[5] = fifoBuffer[5]; teapotPacket[6] = fifoBuffer[8]; teapotPacket[7] = fifoBuffer[9]; teapotPacket[8] = fifoBuffer[12]; teapotPacket[9] = fifoBuffer[13]; Serial.write(teapotPacket, 14); teapotPacket[11]++; // packetCount, loops at 0xFF on purpose #endif I thought about saving the data from each fifo buffer to a txt file on the SD card but I have no idea how to upload this data into the teapot demo??? Apologies if this is a simple problem I am relatively new to programming but enjoying the challenges it presents, any advice will be greatly appreciated.
×
×
  • Create New...