I am creating a simple app that stores data from the axes of the gyroscope, accelerometer, and orientation sensor. I am using the clock, and I want approximately 100 data points to be saved per second. This data is stored in a local list so that, at the end, when I press the stop button, it is saved to a .csv file. However, there are repeated data points, and I believe this is because the update frequency of the sensors is capped. Is there any extension or recommendation so that I can have 100 data points per second without duplicates?
MoveSense_copiar.aia (65.8 KB)
For pure data collection, the Clock1.SystemTime value comes as a large integer, suitable for sorting, merging, filtering, and conversion later for display purposes.
Storing a formatted datetime with raw data is premature, breaks the sort order, and would need to be reversed later for filtering and merging.
To max out unique data collection, notice that each of those 3 sensors has its own Data Changed event block. I would assume that sets the speed limit on data collection for each sensor independently.
If you allocate 3 global lists, one per sensor, you could collect raw timestamped data (Clock1.SystemTime) for each sensor as its event block fires.
If you need to sync the lists, you could merge their data later (if you really need that.)
"What happens is that I want approximately 100 data points per second, but the values are repeating. I think it's because the sensors have a slow update frequency. So, how can I increase it? Or do you have any suggestions for what I can do? Currently, my code is like this:"
"As you can see, the file that it saves has repeated values, and I want a frequency of 100 per second. Is that not possible?"