Seeed-Studio / Seeed_Arduino_DopplerRadar

Arduino library for DopplerRader
MIT License
3 stars 6 forks source link

Calling getSpeed() with delays of 300 ms or larger between readings causes lag and data corruption #5

Open adriaanb opened 4 years ago

adriaanb commented 4 years ago

According to the specifications of the sensor, the sensor reading is updated every 300 ms.

Using delays of less than 300 ms between calls of getSpeed() therefore yields redundant readings. Using a delay of 300 ms or larger to ensure non-redundant readings will however lead to increasing lag and corruption in the data returned. This might also be the case for some lower values, 200 ms is confirmed to work. Calling the function too fast in succession however will cause issue #3.

This behavior can be reproduced using the BGT24LTR11_DETECTION_TARGET.ino example code. I tested it on an Arduino Nano 33 IoT.

Pillar1989 commented 4 years ago

@adriaanb I saw a series of questions from you. Is it the same question?

adriaanb commented 4 years ago

@Pillar1989 No, they are three different issues. The behavior of issues #3 and #4 are similar, issue #5 is different.

x29a commented 1 year ago

@adriaanb if you need to rely on values only to be received once, i would not call getSpeed() and such but just read from the module since it will send its updated values on its own each 300ms.

Syncing the two devices via delays is near impossible IMHO.