(arduino の新機能) 以下のコードの問題点は、ポート 9 と 10 が同時に点滅し、後でポート 11 が点滅することです。
ポート 3、5、6 で試すと、正常に動作します。9、10、11 ポートのみに問題がある
const int col[3] = {9,10,11};
void setup() {
for (int thisPin = 0; thisPin < 3; thisPin++) {
pinMode(col[thisPin], OUTPUT);
}
}
void loop() {
refreshScreen();
}
void refreshScreen() {
for (int index = 0; index < 3; index++) {
digitalWrite(col[index], HIGH);
delay(300);
digitalWrite(col[index], LOW);
}
}
私のarduinoには欠陥がありますか、それともPWMポートはこのように動作します!!! ?