Is there any way to change to frequency of data retrieval? I mean, If I want to get as much data as possible, like as frequent as possible for OBD, MEMS and GPS, How I can do it?
Thanks. Guillermo.
Is there any way to change to frequency of data retrieval?
Re: Is there any way to change to frequency of data retrieva
I think if you don't change the code, its the fastest method. If you want to slow it down or set a frequency, it works with delays in the loop.
But setting a frequency would be also very interesting for me, so I ask, if someone has a idea for implementing it.
Biggest problem should be, that CAN is much faster than KWP, so it only works good for one of them. Correct me if Im wrong.
Another difficulty: The highest possible frequency depends on how many PIDs / GPS or ACC-Data you want to log.
So implementing a frequency as a sampling rate for all protocol types and different configurations is not that easy (with a high accuracy).
But setting a frequency would be also very interesting for me, so I ask, if someone has a idea for implementing it.
Biggest problem should be, that CAN is much faster than KWP, so it only works good for one of them. Correct me if Im wrong.
Another difficulty: The highest possible frequency depends on how many PIDs / GPS or ACC-Data you want to log.
So implementing a frequency as a sampling rate for all protocol types and different configurations is not that easy (with a high accuracy).
Re: Is there any way to change to frequency of data retrieva
I don't know about OBD or GPS, but for the MEMS unit, the datasheet says that you can get up to 8KHz for the gyroscope sample rate, and up to 1KHz for the accelerometer sample rate. Although this is configurable, the default SMPLRT_DIV value of 0 corresponds to the highest possible sample rate, and the v4 datalogger doesn't appear to set the SMPLRT_DIV register.
So, that gives you a theoretical limit for MEMS, at least. With the ATMega328p running at 20MHz, you should be able gather accelerometer and gyroscope samples at 1KHz. I guess it's just a matter of programming the data logger correctly.
So, that gives you a theoretical limit for MEMS, at least. With the ATMega328p running at 20MHz, you should be able gather accelerometer and gyroscope samples at 1KHz. I guess it's just a matter of programming the data logger correctly.