-2

Hello and in advance thank you for reading my post,

I am working on a project which is controlled by a stepper motor which also includes an encoder. I have made the motor running and now I want to proceed to the next step and include the functions of the encoder. I know that the encoder tells me the actual position travelled by the motor, however, as I am still quite a newbie, I have unfortunately no idea how to include the information of my encoder into my code (which library? which variables). Both motor and encoder are connected to my Arduino Uno and I have also attached a photo with the corresponding pins for the encoder.

Thank you for any much required help

J.Doe
  • 13
  • 2
  • 1
    I'm voting to close this question as off-topic because it really belongs on http://robotics.stackexchange.com/ – Ro Yo Mi May 18 '16 at 00:28

1 Answers1

-1

Here's a huge list of resources and libraries, that should get you started: http://playground.arduino.cc/Main/RotaryEncoders

I'd recommend using this library as it automatically takes advantage of the interrupt capabilities, if you connect the encoder to the correct pins (2 & 3 on the Uno). You might need this in order to still get precise measurements even at high rpm.

jsphpl
  • 4,800
  • 3
  • 24
  • 27