Closed asafosci closed 5 years ago
Hi,
sorry for the late answer. In case this still helps, you can very easily implement or add a callback function from your main program to a measurement loop inside a measurement function.
Example see: https://stackoverflow.com/a/40843238
Also, you might want to have a look at the threading module: https://docs.python.org/3/library/threading.html
Regards, Ulrich
I'm sampling at around 50 Hz. the library works extremely well. Currently i use a while loop and call ads.read_continue() inside. is it possible to forego the loop and somehow let the ads call back instead when it has 50 samples ready and maybe even place them to memory to be collected ?