After rewiring optical shaft encoders for my drive, I tested the values in the ROBOTC debugger windows, but even when they were rotating, the only returned 0. I’ve had this problem before, but it was solved by switching the two wires in the ports. I did that, but there is still no change.
Please help, I have state in 3 days and need to finish auton
Your encoders probably broke. Try replacing them
OK, will try tomorrow when I am at school
If you can, try a different encoder, maybe it broke. But you can also just use timings if you really need to make an auto fast. Just make sure that after every delay you tell the motors to stop or it will coast and be inconsistent.
Timing is much less consistent with cortex, so that’s not really a good option.
Just gunna give a bunch of ideas here:
One/both of the ports it’s in is dead?
Make sure port and code are both the proper type (sensor side, digital/analog)
The port # in the code vs the place it’s reading from?
Make sure the driven axel is actually spinning the disk inside the encoder (axel not in enough, or hole worn out round)?
Hope you can solve this!
I replaced the encoders, and one side is working again, but the other side is not working. I checked all of the things that @JADE8232 mentioned.
Were both sides not working before? And now one side does?
Both sides were not working before, and then only one side worked. After waiting for about thirty minutes, both sides worked again (after replacing both encoders)