No announcement yet.

Motor Encoders and Blocks Programming

  • Filter
  • Time
  • Show
Clear All
new posts

  • Motor Encoders and Blocks Programming

    Motor encoders are not working. We are not sure if there is a problem with the Neverest 3.7 motors and the Encoders or if it is a programming issue. We replaced old motors that were moving very fast with new ones and the robot slowed down, but still moving too fast. When telemetry was used to figure out current position of the motor it stayed at zero when the motor was moving. The motors don't stop or reach the target position. Please let us know what we should try to fix this. If someone can look at the programming that would be helpful. My co-coach and I are non-technical and the teams that can help us are not using Blocks programming. Thank you.

  • #2
    If the encoder values (from <motor>.getCurrentPosition()) stay at 0, the motors will run fast in RUN_USING_ENCODERS as they try to close the speed gap. They will not be able to work in RUN_TO_POSITION - so it won't stop where you expect (if at all).
    You should make sure your encoder cables are correct. They need to have a crossover of some of the wires, and they need to use the level shifter with the shiny squares facing out from the connection. And make sure they aren't plugged in backwards.
    You can make a simple opmode that just prints the encoder positions to the screen. Then rotate the wheels by hand and you should see the encoder counts move.


    • #3
      Thanks. They were plugged in backwards!