Go Down

Topic: Serial monitor for 2 DC motors (Read 519 times) previous topic - next topic


Hi everyone,

I am working on a project that is using 2 dc motors with encoders (running one after the other). I have a working code that is controlled by which key on the keyboard I press. For both motors I have made a command so that when a set key is pressed the motor will go back to a count of 0 (start position) and when I test this using just one motor I can see it working with the serial monitor counting the encoder. Is it possible to count for both motors in the same code? So when the first motor has run its course and has been made to go back to a count of 0, I can then control the next motor in the same monitor window and it will then count for that motor. Sorry if I have explained this poorly. Any help is much appreciated, I still very new to arduino so I may be missing something obvious.


Is it possible to count for both motors in the same code?

If you want more help post the program that represents your best attempt at working with the two motors.

Two or three hours spent thinking and reading documentation solves most programming problems.


Thanks Robin. I managed to work it out. Thanks for replying though

Go Up