This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Illuminance vs. distance with SensorTag
Beautiful data and nicely done. It is great to see all these well-designed contributions.

To link data from sensors that are not synchronized, the following workaround helps with "slow" data rates like in this case:
Let both sensors write to a buffer of size 1 and set a sleep rate for the analysis process so that it is executed at approximately the rate that you would like to get. Then take the data from both buffers without deleting their content (disable the clear function) and append them to a larger buffer each. This way, you always append the latest value from both buffers and if one has a new value, it will be paired with copy of the old value from the other sensor as it is still in the buffer. You can also generate a matching time axis using the timer-module. A downside to this approach is that values may appear multiple times or might be missed - depending on how you choose your sleep-value compared to the sensor rate. But for this type of experiment this does not really matter.

In any case, I will bump "write a proper interpolation function" a bit further up on my todo list Smile

One other note to anyone who wants to try this experiment:
You will not be able to do any experiment with a Bluetooth mouse on iOS. The iPhone filters the entire HID service and phyphox cannot even see that this device offers such a service. Similar to when the mouse is used as an actual cursor on Android, but it cannot be deactivated on iOS. Therefore it cannot be accessed from our generic BLE interface, but would require an explicit implementation for pointer devices.

Messages In This Thread
RE: Illuminance vs. distance with SensorTag - by Sebastian Staacks - 05-05-2020, 08:59 PM

Forum Jump: