Encoder problems

We are having an issue which the code says that there is already something on “Slot 4 Channel 4” whenever I use the encoders. But the problem is that our encoder isn’t on “Slot 4 Channel 4” and it doesn’t matter if there is something in “Slot 4 Channel 4” or not it throws that error.

Pat Cunningham

Do you assign two sensors to the same channel? Thats what I’ve seen cause that error.

I’m also from team 178, and no, we did not have two sensors plugged into the same port - we checked that already.

No, that isn’t what he meant. If you accidentally assigned two to the same port in your code, that’s when the error would arise.

The code only has one pointer to slot 4 channel 4

I’m 99% sure the code defaults to slot 4, so if your code has anything like this:

Servo/Victor/Whatever object = new Blah**(4)**;

Would also produce the same error, whether you’re including the slot argument or not.

To be able to help you further I’d need to see your code.