I'm having some trouble with the VEX shaft encoders as well... I think it's a hardware related problem, but here is the code I'm using to count the ticks:
Code:
if (rc_dig_int1 != left)
{
left = rc_dig_int1;
leftoptenc = 1 + leftoptenc;
}
if (rc_dig_int2 != right)
{
right = rc_dig_int2;
rightoptenc = 1 + rightoptenc;
}
It all sort of works, but even when I have both shafts tied together, the values will jump back and forth by 10, and if I leave it for a while, hundreds, although both have had the same amount of revolutions.