Go Down

Topic: MPU6050 low sampling rate (Read 644 times) previous topic - next topic

GeoKrok

Pylon until i reach stable sampling rate it is necessary for me to know in every second how many values i record. Because I plan to process these retrieved signals in matlab. When the sampling frequency stabilizes e.g. 80Hz or even better 100Hz i wont need the rtc running so many times in a second. Any idea?

pylon

Quote
Pylon until i reach stable sampling rate it is necessary for me to know in every second how many values i record.
You definitely don't need the RTC for that!

Quote
Because I plan to process these retrieved signals in matlab.
Completely irrelevant!

Quote
When the sampling frequency stabilizes e.g. 80Hz or even better 100Hz i wont need the rtc running so many times in a second.
Excuse the word: bullshit!

Have you ever tried to use the millis() value the Arduino IDE offers you?

GeoKrok

pylon thanks for your answer. Can you tell me how many values I record per second without using the RTC?

P.S. i was not aware of millis() value.

pylon

Quote
Can you tell me how many values I record per second without using the RTC?
You have the hardware, why don't you just try it? You definitely get a higher frequency than you can reach using the RTC.

GeoKrok

Pylon i mentioned that until i reach stable sampling rate it is necessary for me to know in every second how many values i record and you answered that "You definitely don't need the RTC for that!". So my question is how  to know how many values I record per second without using the RTC? Let's say i leave it writing to sd card a csv file for 1 hour. When i open the file, how can i determine the samping rate if i do not have timestamp?

pylon

Pylon i mentioned that until i reach stable sampling rate it is necessary for me to know in every second how many values i record and you answered that "You definitely don't need the RTC for that!". So my question is how  to know how many values I record per second without using the RTC? Let's say i leave it writing to sd card a csv file for 1 hour. When i open the file, how can i determine the samping rate if i do not have timestamp?

One second is over if millis() has increased by 1000. So the easiest way to achieve what you described is to write the millis() value onto your card together with the values. Count the values written until that value is 1000 bigger than at the start. Not to complicated I think.

GeoKrok


Go Up