The encoders example in the Romi 32U4 Arduino library will not work as is, because the Romi 32U4 robot uses XOR gates to combine the channels (A and B) of each encoder to use only one interrupt, which the A-Star 32U4 robot controllers do not. You would need to modify the Romi32U4Encoders library or add XOR gates between the pins you plan to use for each encoder to get that example to work with the A-Star 32U4 robot controller.
It would probably be easier to use one of the Arduino libraries for quadrature encoders. You can find those libraries on the “Reading Rotary Encoders” page on the Arduino website.
By the way, you might find this thread about using the Zumo32U4Encoders library for the A-Star 32U4 SV robot controller helpful.
- Amanda
