ArduinoGeneral

Help with RoMeo V2[R3] and 6V 40RPM 10kg-cm - DC Motor

userHead Account cancelled 2020-05-26 21:15:51 1083 Views2 Replies
Hi there

I have RoMeo V2[R3] board and I am trying to use the integrated 2 way DC motor driver circuit to drive 2x 6V 40RPM 10kg-cm - DC Motors
Code: Select all
This is the code:
int E1 = 5;    //M1 Speed Control
int E2 = 6;    //M2 Speed Control
int M1 = 4;    //M1 Direction Control
int M2 = 7;    //M1 Direction Control

void setup(void){
  Serial.begin(19200); 
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
}
void loop(void){
  analogWrite (E1,a); 
  digitalWrite(M1,HIGH);
  analogWrite (E2,b);
  digitalWrite(M2,HIGH);
}
I connected 9v through the System & Motor power in port but nothing happens
I also made sure that the System & Motor power switch is on

What am i doing wrong.
The board works fine with all other sensors, just the DC motor bit.