got a resource problem and am constantly running out of memory on my Panda II.
i took the easy route, by creating a thread for each sensor i use, to read data and save it to a file.
now i am wandering if this “easy” way may have been the wrong path that i have taken.
There can be a user specified number of sensors (of different types - analog, I2C, onewire)
and each can have a different time interval in which they are scanned, so it has to be somewhat dynamic.
has anyone tries using timers to get rid of threads, or do they use just as many resources?
if for example a sensor needs to get scanned every 5 seconds, then i use sleep in between reads.
if i set up a timer, which calls the callback function every 5 seconds, then i could theoretically achieve the same logic and may save resources
in my case it does not matter if the scan time variation is 100 ms or so.
has anyone tried this?
would like some user input before ripping the app apart
any comments are appreciated.