Read the signal of the encoder
All Master count inputs (
Generate an output value between zero and 65535 (16 bits total). When you exceed the value 65535, it starts again from scratch; and when it drops below zero, it starts from 65535. This mechanism allows many applications to read the value asynchronously. Applications can be undertaken to do this and are not required to register any change in the value. Just read the value periodically, sometimes at least every second, to never miss the step.
The application Theremino Counter/Reader shows how to correctly read the encoders and counters.
Simple projects can use Theremino Counter/Reader to read an encoder from a slot and write the value to another, but major applications should use the “
CounterReader". In this way, they would have access to the function
ReadValue to be called periodically and
function that resets the value at any time (what is done by the Counter Reader button “Zero Set”).
Please download the complete documentation and source code from here.
For a complete view of the Theremino System please visit here.