I am using a 12V DC motor with a quadrature encoder. I do not know the specs and neither do my colleagues. We have this project going on and we are using this old spare motor we have. What I am working on is designing this spool system that will be attached on the base of the robot, the spool itself should reel out a specific amount of wire controlled by either the revolution or the counts per revolution. I got a code, with PID as that’s what we wanted, that reads the counts for continuous rotation in one direction depends on what I put in the code lines for that specific section. I am using a Pololu G2 High-Power Motor Driver 24v21 to drive the motor. Additionally I’d like to have something that’ll be easy to turn it on and off and switch direction with i.e let’s say press 5 on keyboard to start and 6 to stop when I read it from Python. So any help or ideas would be appreciated.
Keep in mind that I’d like to later on test it with Python as the robot runs on python, so I’ll have to send data.
sketch_aug28_full.ino (3.21 KB)
sketch_aug26_encoder_counts.ino (1.06 KB)