tinkerspy / Automaton

Reactive State Machine Framework for Arduino
https://github.com/tinkerspy/Automaton/wiki
MIT License
374 stars 63 forks source link

16Bit I2C AD converter? #66

Open DrAle85 opened 5 years ago

DrAle85 commented 5 years ago

Hello, first of all, a really great library! It has helped me a lot! I have a question : I would like to use this AD converter with I2C https://www.adafruit.com/product/1085 in order to get precise measurements from a 0-10V analog output. Is there a machine which can already do this in the library? Or is it something one has to program in a separate machine and if so, do you have any suggestions on how to implement this? Thanks!

tinkerspy commented 5 years ago

There's nothing like that made AFAIK. But it's not that difficult. You could create a subclass of the Atm_analog machine and override the (virtual) read_sample() function to read a value from your adc instead.