Search found 4 matches
- Mon Oct 06, 2025 12:45 pm
- Forum: ESP32 Arduino
- Topic: How to achieve stable sampling rate (1 kHz) when reading IMU data and sending over Serial on ESP32?
- Replies: 7
- Views: 4066
Re: How to achieve stable sampling rate (1 kHz) when reading IMU data and sending over Serial on ESP32?
No real use making Ts a double if you then go cast it to an int anyway:
nextSample += (uint64_t)Ts
Suggest you make nextSample a double as well.
Hi Sprite ,
Thanks again for your help.
I’ve modified my code, and now I’m able to synchronize both signals (ESP vs. commercial system).
I’m ...
- Fri Oct 03, 2025 3:20 pm
- Forum: ESP32 Arduino
- Topic: How to achieve stable sampling rate (1 kHz) when reading IMU data and sending over Serial on ESP32?
- Replies: 7
- Views: 4066
Re: How to achieve stable sampling rate (1 kHz) when reading IMU data and sending over Serial on ESP32?
The error is fairly small - I'm eyeballing that at the end the amplitude is about 1/3rd of the actual waveforms, meaning it leads or lags by (sin-1(0.333)/2*pi=)0.04 cycles. On a total of 80 cycles, that's about 0.05%. That is probably be explained by the fact that you're using ints for Ts ...
- Fri Oct 03, 2025 2:27 pm
- Forum: ESP32 Arduino
- Topic: How to achieve stable sampling rate (1 kHz) when reading IMU data and sending over Serial on ESP32?
- Replies: 7
- Views: 4066
Re: How to achieve stable sampling rate (1 kHz) when reading IMU data and sending over Serial on ESP32?
The error is fairly small - I'm eyeballing that at the end the amplitude is about 1/3rd of the actual waveforms, meaning it leads or lags by (sin-1(0.333)/2*pi=)0.04 cycles. On a total of 80 cycles, that's about 0.05%. That is probably be explained by the fact that you're using ints for Ts ...
- Thu Oct 02, 2025 7:45 pm
- Forum: ESP32 Arduino
- Topic: How to achieve stable sampling rate (1 kHz) when reading IMU data and sending over Serial on ESP32?
- Replies: 7
- Views: 4066
How to achieve stable sampling rate (1 kHz) when reading IMU data and sending over Serial on ESP32?
Hello everyone,
I am working with an ESP32 and an ICM-45686 IMU.
My goal is to acquire accelerometer and gyroscope data at 1.024 kHz and send it to a PC via serial. On the PC side, I have a Python script that receives the data and saves it.
I would like to evaluate whether the sampling rate of the ...
I am working with an ESP32 and an ICM-45686 IMU.
My goal is to acquire accelerometer and gyroscope data at 1.024 kHz and send it to a PC via serial. On the PC side, I have a Python script that receives the data and saves it.
I would like to evaluate whether the sampling rate of the ...