Log in

View Full Version : Encoder problems


Pat_Cunningham
20-02-2011, 17:25
Hello,
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.

Thanks,
Pat Cunningham

JewishDan18
20-02-2011, 17:54
Do you assign two sensors to the same channel? Thats what I've seen cause that error.

Amanda_Theilman
20-02-2011, 18:49
I'm also from team 178, and no, we did not have two sensors plugged into the same port - we checked that already.

ArchVince
20-02-2011, 19:07
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.

Amanda_Theilman
20-02-2011, 19:10
The code only has one pointer to slot 4 channel 4

Robby Unruh
20-02-2011, 20:18
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.

ArchVince
21-02-2011, 00:35
To be able to help you further I'd need to see your code.