Below is an example program I copied and pasted.
I understand most of it fairly well.
The problem I have is;
The pins 5,6 and 7,8 are not connected by any wires to the motors of my robot.
How does the UNO board know they are for the motors?
I changed 5,6 to 9,10 pins and it still run fine.
/* Copy and paste the code below into the Arduino software */
int E1 = 6; //M1 Speed Control
int E2 = 5; //M2 Speed Control
int M1 = 8; //M1 Direction Control
int M2 = 7; //M2 Direction Control
void setup()
{
int i;
for(i=5;i<=8;i++)
pinMode(i, OUTPUT);
Serial.begin(9600);
}
void loop()
{
int leftspeed = 255; //255 is maximum speed
int rightspeed = 255;
analogWrite (E1,255);
digitalWrite(M1,LOW);
analogWrite (E2,255);
digitalWrite(M2,LOW);
delay(100);
}
Thank you,
Dale