04-13-2012 01:44 PM
Hello,
This example reads 0,1 values from an incremental rotary encoder (360 P/R) connected to pin 3 of Arduino UNO.
The value is displayed both on numeric indicator and waveform chart.
The short delay 2 ms is ok for detecting all changes of state at required rotation speed.
Question: how can I reset the (incremental) counter, so that it counts from 0 to 360, then restarts every time?
It should behave like a ìn absolute encoder.
I am looking for something like the history property for charts.
I tried with the property 'Reinitialize to default' but I feel I should reset the feedback node or the shift register
Thank you
04-14-2012 06:19 PM
You could just write 0 to a local variable of "counter" for reseting it. For the shift register, just run that through the case structure and write 0 to it in the true case, otherwise, just pass it on through.