We’re use the E4T encoder but when we tried to read ticks, 0 ticks is constantly reported. Any help please?
Please provide more details:
- What device are you using to read the encoder (SRX, RoboRIO DIO, Arduino, other)?
- How exactly is it wired?
- Can you provide the code you’re using?
- What’s the mechanical connection (e.g. Toughbox Mini backshaft)?
At the first level, there are two possibilities: hardware and software. To test hardware, you will want to put a meter (or o-scope) on one or both of the encoder pins (black on ground, red on an encoder pin). If using a scope, you should get a square wave. If your meter has a Hz/% setting, use that, spin the gearbox at a good speed, and see what your results are. You should get a non-zero frequency and approximately 50% duty cycle. If not, just measure voltage and spin the gearbox slowly (that is, by hand), to see if the voltage goes up and down.
Software is trickier and far more dependent on your situation.