dc motor with rotary encoder is a new thing for me , can someone tell me an example for the program?
please see attachment for the motor dc

dc motor with rotary encoder is a new thing for me , can someone tell me an example for the program?
please see attachment for the motor dc

You'll need to do a few things, but thankfully there are pre-written Arduino libraries that'll do a lot of the work for you.
Now the Arduino can track the motor's position, you need to be able to control the motor.
Now you can make the motor move, and you can track its position.
Good luck ![]()
Hi.
This is your motor on the photo ?
Did you get it from a scanner or a printer ( HP ) ?
I got some of these from HP printer and multifunction officejet printer.
With so many wires, it's looks like a quadrature rotary encoder.
Nice tutorial here: