你沒有這片板子的規格或是說明書嗎?
應該查一下就知道那顆紅燈到底幹嘛的哩作者: sinocgt 時間: 2011-7-21 08:44
底下這例子是我從這台車使用手冊擷取下來,你完全不用改,直接讓它執行,如果接線對的話,兩顆馬達會全速轉動.作者: sinocgt 時間: 2011-7-21 08:47
/* 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);
}