KidsBits L9110Fan R11ケーブルで簡単接続。 Arduino 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26#define PINIA 2 #define PINIB 3 void setup() { pinMode(PINIA,OUTPUT); pinMode(PINIB,OUTPUT); } void loop() { //時計回り digitalWrite(PINIA,LOW); digitalWrite(PINIB,HIGH); delay(3000); //停止 digitalWrite(PINIA,LOW); digitalWrite(PINIB,LOW); delay(2000); //反時計周り digitalWrite(PINIA,HIGH); digitalWrite(PINIB,LOW); delay(3000); //停止 digitalWrite(PINIA,LOW); digitalWrite(PINIB,LOW); delay(2000); }