Robofun 機器人論壇

標題: 亮紅燈是什麼意思? [打印本頁]

作者: blessedlife    時間: 2011-7-20 20:20
標題: 亮紅燈是什麼意思?
如題:

(閃爍)

int E2 = 6;
int E1=5;
int M2 = 8;
int M1=7;
void setup()
{
pinMode(E2, OUTPUT);
pinMode(M2, OUTPUT);
pinMode(E1, OUTPUT);
pinMode(M1, OUTPUT);
Serial.begin(9600);
}
void loop()
{
analogWrite (E2,63);
digitalWrite(M1,HIGH);
delay(1000);
analogWrite (E2,0);
digitalWrite(M1,HIGH);
delay(1000);
analogWrite (E2,255);
digitalWrite(M1,HIGH);
delay(1000);
analogWrite (E2,0);
digitalWrite(M1,HIGH);
delay(1000);
analogWrite (E2,191);
digitalWrite(M1,HIGH);
delay(1000);
analogWrite (E2,63);
digitalWrite(M1,HIGH);
delay(1000);
}

是因為電流太大嗎?
作者: rayrider    時間: 2011-7-20 21:06
應該不是,電流太大應該有自動復位保險絲把它停掉。
作者: blessedlife    時間: 2011-7-20 21:23
剛剛試了
7.2V電池 15T馬達
紅燈還是依樣在閃爍
但H橋發燙
作者: mzw2008    時間: 2011-7-20 23:12
H橋燙是一定的
我都是裝大顆散熱片加小風扇

你沒有這片板子的規格或是說明書嗎?
應該查一下就知道那顆紅燈到底幹嘛的哩
作者: 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);
}




歡迎光臨 Robofun 機器人論壇 (https://robofun.net/forum/) Powered by Discuz! X3.2