Etape 1: Le Code de l’Arduino
Voici le code pour télécharger sur votre arduino :
led1 int = 13 ; LED pluggued en 13 broches sur arduino
État int ;
void setup() {}
Serial.Begin(9600) ; initialiser une communication série 9600 bits par seconde
}
void loop() {}
Si (Serial.available() > 0) {}
État = Serial.read() ;
}
ElseIf (État == « a ») {}
ton (led1, 264, 500) ;
}
}