I am new to Arduino and programming.
I would like to save Accel, Gyro and Temp data of mpu-6050 together with two other sensors(proximty and IR sensor to calculate rpm) on sd card. I need to save my data with at least 20 samples per second for 2 weeks and I need to write real time for each sample.
I am using Arduino Uno board with XD-204 data logging shield to save data and use RTC of that.
When I am running the code (only for mpu6050) I have something around 100 samples per second. But when I start to save data on sd card, I receive only around 20 samples, and by adding LCD to the code, it reduces to 8 samples per second.
My timing stamps is not with equal distances and after some seconds I have one less sample in a second.
I need to write timestamps on milliseconds but RTC gives me on seconds.
I would be thankful if someone helps me. Maybe I need some other boards or some tricks in code in order to solve that.