Hi, I am trying to get this
running along with this.
I have servo and sensor connected to groove shield, however motorshield somehow affect servo and sensor values!
According to the manual motorshield uses 5,4,6,7 pins, but it clearly does not.
Also this manual is very confusing and unclear.
I have these functions to run the motors:
[code]
void moveFwd()
{
digitalWrite(M1,HIGH);
digitalWrite(M2, HIGH);
analogWrite(E1, 200);
analogWrite(E2, 200);
delay(1000);
}
void moveLeft()
{
digitalWrite(M1,HIGH);
digitalWrite(M2, LOW);
analogWrite(E1, 200);
analogWrite(E2, 200);
delay(1000);
}
void moveRight()
{
digitalWrite(M1,LOW);
digitalWrite(M2, HIGH);
analogWrite(E1, 200);
analogWrite(E2, 200);
delay(1000);
}
void moveBwd()
{
digitalWrite(M1,LOW);
digitalWrite(M2, LOW);
analogWrite(E1, 200);
analogWrite(E2, 200);
delay(1000);
}
void halt()
{
analogWrite(E1, 0);
analogWrite(E2, 0);
}[/code]
Maybe I made some mistakes, as it not really working, because I cant understand speed control.
So I made different scetch for testing, witch just starting all the functions in a row with 10 seconds delay, but servo acting wierd, turning randomly. So here is my question - what is wrong with motorshield?