I am attempting to setup a Rover 5 using a mini-leonardo as a controller and need to know how I could use the second signal wire to measure the distance travelled.
I connect one end of leonardo to the battery(two 18650) and the motors to the other(making sure positive and negative are correct in all cases). Now each motor encoder has 4 wires as output and I am pretty sure that if I connect black to ground red to VCC and yellow to signal I should be able to control the robot, but what or how can I use the white wire to determine distance travelled?
What is a Rover 5?
Please provide a link or data sheet.
You have encoders? Are you able to write a sketch that just reads the encoders and prints to the serial monitor when it gets a pulse? That will confirm that you have the encoder hooked up.
Sorry I should have said that a Rover 5 is a tracked robot platform made up of chassis, two motors driving tracks and motors have attached encoders.
I have been supplied a Mini-leonardo as the robot controller. I know a little(very little) about programming an Arduino but the part I need an answer to is the electronics. Six wires comping out of encoder/motor of which two are obviously power supply and the other four to connect to the controller to control the encoders/motors.
Plugging the power supply in is relatively obvious but of the other four wires(black, red, yellow, white) where do these go.
I asked for a link. You gave a description. That does not help.
I googled "dagu rover 5"
The first hit was Rover 5 Tank Chassis (4 motors with 4 Encoders)-DFRobot
I have no idea if this is the same thing you are referring to, which is why I wanted the link so I would not be guessing.
Continuing on, I looked at the page and saw a link to the PDF version of the manual.
Conveniently, it details the specifics of how to use the encoder.
Let us know if this answers your questions.
I apologise for being less than clear. I have a lot to learn, this being my 1st attempt at robotics.
Your articles/links very instructive and give me a bit to work through. So for now can we treat this conversation as successfully completed and if I have any further questions, which I am sure that I will have, I will open new thread.
Thank you for being patient and assisting as well as you did.