So, we’re trying to use an encoder for autonomous, since it’s more precise and reliable. Unfortunately, we’re trying to use a VEX Shaft Encoder, which is not exactly easy.
We’ve McGyvered a male-to-male adapter, so we can actually plug the Encoder up, and I’ve written code as though it were any old encoder.
I get no information from this encoder.
If anyone has experience getting a VEX encoder to work with the roborio, we could use some advice.
For clarification purposes:
- We are only plugging in one of the two plugs on the VEX Encoder, since we only had enough spare wiring to McGyver one adapter.
- We have no assurance that our McGyvered adapter actually works, although we don’t have any reason to think it doesn’t either (apart from it being a Frankenstein of wiring)
- I am coding using python
- The actual lines of code I wrote are as follows:
self.encoder = wpilib.Encoder(0,1,False)
count = self.encoder.get() print(count)
- The code is only printing “0”
We’re not out of luck if we can’t get this to work, but it’d make our drivers’, our pit crew’s, and my lives much easier. Anyone have any ideas??