Forum >PWM motor code - difference between Romeo V1.1 and V1?
ArduinoGeneral

PWM motor code - difference between Romeo V1.1 and V1?

userHead robvoi 2012-06-02 06:35:04 3399 Views3 Replies
Hi,

while my broken Romeo all in One V1.1 board is in the replacement process I bought a Romeo V1.
This PWM code worked fine on the V1.1:

void advance(char a,char b) //Move forward
{
analogWrite (E1,a); //PWM Speed Control
digitalWrite(M1,HIGH);
analogWrite (E2,b);
digitalWrite(M2,HIGH);

Now on the V1 I need the code below to have the robot move forward:

void advance(char a,char b) //Move forward
{
analogWrite (E1,a); //PWM Speed Control
digitalWrite(M1,LOW);
analogWrite (E2,b);
digitalWrite(M2,HIGH);


Polarity on the motor hasnt't changed. Red cables go to +, black cables go to -.

Any idea??

Thanks
Robert
2012-06-06 19:08:54 Hi Robert,


Error by design 8) .


Let me know if you find more anomalies between the 2 Romeos, or if the solution provided does not work as expected...



userHeadPic Hector
2012-06-06 04:04:07 Hi Hector,

thanks for the feedback. At least it is no error but by design :-)

Robert
userHeadPic robvoi
2012-06-06 00:42:19 Hi Robert,




Thanks for pointing that out. Its not a major mistake or error. But I guess when the designer was making the changes necessary to accommodate for the ICSP header to be Arduino compatible on the new Romeo he had to make a minor change to the motor paths.


All you need to do is reverse the polarity on one of the motor terminals and your problem should be fixed.

userHeadPic Hector