Programming the Pololu's Micro Dual Serial Motor Controller
Vincenzo1309
Posts: 76
Dear all,
I am currently using this motor controller for my project. I have written a simple program to move a remote controlled car... the front motor controls left and right movement and the rear motor controls the forward and backward movement. Motor supply used :9V battery pack of 6 AA batteries
This simple program is to move the rear motor non-stop in one direction.
SEROUT 4, 84, [noparse][[/noparse]$80, 0, 0, 127]
Observations : when the above code is downloaded, I notice that the motor would move for few seconds and then stop. Is it because it had reached the full speed at 127 and therefore would not move anymore?
when I tried to add in the Do...Loop as illustrated below
Do
SEROUT 4, 84, [noparse][[/noparse]$80, 0, 0, 127]
Loop
Observations : the motor can move non-stop in full speed.
So does that mean that it is essential to add in the Do..Loop to make the motors turn non-stop?
Kindly advise.
Regards,
I am currently using this motor controller for my project. I have written a simple program to move a remote controlled car... the front motor controls left and right movement and the rear motor controls the forward and backward movement. Motor supply used :9V battery pack of 6 AA batteries
This simple program is to move the rear motor non-stop in one direction.
SEROUT 4, 84, [noparse][[/noparse]$80, 0, 0, 127]
Observations : when the above code is downloaded, I notice that the motor would move for few seconds and then stop. Is it because it had reached the full speed at 127 and therefore would not move anymore?
when I tried to add in the Do...Loop as illustrated below
Do
SEROUT 4, 84, [noparse][[/noparse]$80, 0, 0, 127]
Loop
Observations : the motor can move non-stop in full speed.
So does that mean that it is essential to add in the Do..Loop to make the motors turn non-stop?
Kindly advise.
Regards,
Comments
What do you mean by "set it and forget it" device? Do you mean when we send this command over, it will execute this command forever?
I have tried taking out the loop, and the motor do time out after a while.
So does that mean the Do..Loop did play a part?
·
Also when I hold the robot in the air, it responded perfectly to the commands.· Any ideas on why this is happening?
For my case, what exactly happened was that the electrical noise from the DC motors of my robot had impaired the motor controller. Therefore to reduce the noise, I had soldered capacitors onto the terminals of the motors. It works, regardless of whether I have put in the Do..Loop.
Just a reference to all of you, even though you might use other motors, like servo etc....
Regards,
Vincent Chung
agfa
We learn in this forum...... there are so many unforeseen problems in electronics..
Have a nice day! [noparse]:)[/noparse]