May-21-2020, 08:07 AM
I would probably use a loop that:
- put any information collected into a set() (to remove duplicates)
- checked if it's been more than 10s since the last transmission. If so:
* send the data
* zero out the set
* set the last transmission time to "now"