ISR= Interrupt Service Routine. Your code enables interrupts, (attachInterrupt(0, runEncoder1, RISING ); // encoder pin on interrupt 0 >>(pin 2 on arduino)), but I don't see a service routine. I see you have a CLI()=Clear Interrupt Flag, in the main loop of the program. But a ISR will be outside this main loop. Clearly the program is working, so the Arduino IDE put something to return, that is invisible to the end coder.
Typically with quadrature encoders, the interrupt does the count up or down based on the A vs B phase outputs of the encoder. Maybe I'm missing something.
I do like your design of having a dedicated processor as a feed back counter, with it's own display.

LinkBack URL
About LinkBacks

Reply With Quote

Bookmarks