|
如題:
(閃爍)
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);
}
是因為電流太大嗎? |
|