Hi Guys,
I am trying to interface the spark wifi core with the dual motor driver from Pololu (pls see below) to run two dc motors.
Pololu hardware: http://www.pololu.com/product/707/specs#note1
Connections are as follows:
D0 connected to 1INA on pololu
D1 connected to 1INB
D3 connected to 1PWM
VIN connected to +5V IN
GND connected to GND
DC power supply connected to GND and VIN+ of the output side of the polulu driver.
OUT1A and OUT1B of pololu driver connected to motor.
Here is the code i used…
int InA1 = D0;
int InB1 = D1;
int PWM1 = D3; //PWM1 connects to pin 3
int PWM1_val = 127; //(25% = 64; 50% = 127; 75% = 191; 100% = 255)
void setup() {
pinMode(InA1, OUTPUT);
pinMode(InB1, OUTPUT);
pinMode(PWM1, OUTPUT);
}
void loop() {
digitalWrite(InA1, HIGH);
digitalWrite(InB1, LOW);
analogWrite(PWM1, PWM1_val);
}
I am powering the core using a standard 5V DC power supply that can provide up to 1A.
When I run the code…nothing is happening. The Pololu motor driver does not seem to get powered. I know that the pololu motor driver works because I have used it with mBed board successfully.
Any help will be appreciated.
BTW:I am connecting only one motor for now.
Thanks,
P