Sorry if this was asked before, but I could not find something in the forum within the context of edge drivers.
I am writing an edge driver for a LED strip which can be controlled over wifi or infrared. Unfortunately, the device does not support sending an event whenever the properties change over infrared, so I will have to implement some kind of polling. Since the device is not battery powered, this is not such a major concern.
My question is which is the best way to implement polling. For the moment I have create a periodic timer in the cosock thread during device initialization and it appears to be working properly. The timer is stopped on device removal. Is this the correct way to implement this? Do you think that device initialization and removal are the best places to set up the timer? Are there any recommendations for an update interval?
Thank you in advance.