start:arduino:cours:vittascience
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| start:arduino:cours:vittascience [2026/03/08 11:24] – [robot-mbot-controler-le-robot-avec-une-telecommande] admin | start:arduino:cours:vittascience [2026/03/08 11:25] (Version actuelle) – [Mot de passe avec telecommande] admin | ||
|---|---|---|---|
| Ligne 274: | Ligne 274: | ||
| < | < | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | |||
| + | <code c mdp_robot.ino> | ||
| + | #include < | ||
| + | #include < | ||
| + | #include < | ||
| + | #include < | ||
| + | |||
| + | MeRGBLed rgbled_board(7, | ||
| + | MeIR ir; | ||
| + | |||
| + | void serial_setupConnection(long baudrate) { | ||
| + | Serial.begin(baudrate); | ||
| + | while (!Serial) { | ||
| + | Serial.println(" | ||
| + | delay(1000); | ||
| + | } | ||
| + | Serial.println(" | ||
| + | delay(50); | ||
| + | } | ||
| + | |||
| + | |||
| + | void setup() { | ||
| + | ir.begin(); | ||
| + | serial_setupConnection(9600); | ||
| + | rgbled_board.setColor(0, | ||
| + | rgbled_board.show(); | ||
| + | while (!(ir.keyPressed(12))) { | ||
| + | } | ||
| + | while (!(ir.keyPressed(24))) { | ||
| + | } | ||
| + | while (!(ir.keyPressed(94))) { | ||
| + | } | ||
| + | rgbled_board.setColor(0, | ||
| + | rgbled_board.show(); | ||
| + | Serial.println(" | ||
| + | Serial.println(" | ||
| + | delay(1000*1); | ||
| + | } | ||
| + | |||
| + | void loop() { | ||
| + | } | ||
| + | </ | ||
| === robot-mbot-utiliser-le-bouton === | === robot-mbot-utiliser-le-bouton === | ||
/home/chanteri/www/fablab37110/data/attic/start/arduino/cours/vittascience.1772965449.txt.gz · Dernière modification : de admin
