I think you have to make those two variables 'volatile' as I added to your code above. Give it a try and report back.
http://arduino.cc/en/Reference/VolatileLefty
I tried this but both variables are still printing as the same number.
I think you have to make those two variables 'volatile' as I added to your code above. Give it a try and report back.
http://arduino.cc/en/Reference/VolatileLefty
I tried this but both variables are still printing as the same number.