Balancing robot for dummies

So Kas, you are using only one encoder, right? And you are using it to count only one transition of one channel, right? I suppose it's because you have many counts generated per wheel rotation. In my case, I have only 141 counts in single channel, single transition. I use 2 transitions (change) to get double of that, but I suppose I shoul use the full quadrature to get four times 141 to get close to what you're getting with your setup.

Anyway, to understand better, any time an interrupt is generated by pin D3 (interrupt 1) you check the logic state of pin D2 (interrupt 0) and increment or decrement the counter to get the speed and direction at the same time. I do the same thing, but I use a regular I/O pin for the second channel of the encoder and the interrupt 0 for the other motor's encoder. Then I compare the 2 encoder counts to see if the motors are running at the same speed or need to be compensated somehow, usually I speed up the slower motor. But this is for a regular robot. Is it worth the trouble to go all this way for the balancing robot?