From 669574b4b8680ab07cf1c67affe2105fa4f9284f Mon Sep 17 00:00:00 2001 From: Adrian Amaglio Date: Thu, 11 Feb 2021 14:36:23 +0100 Subject: [PATCH] arduino --- projet_bière/test_arduino.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 projet_bière/test_arduino.c diff --git a/projet_bière/test_arduino.c b/projet_bière/test_arduino.c new file mode 100644 index 0000000..e843695 --- /dev/null +++ b/projet_bière/test_arduino.c @@ -0,0 +1,16 @@ +/* Cette fonction est exécutée au démarrage du microcontrolleur */ +void setup() { + /* La led embarquée est définie comme une sortie du microcontrolleur */ + pinMode(LED_BUILTIN, OUTPUT); +} + +/* Cette fonction est appellée après la fonction « setup ». + * Quand elle se termine, elle est à nouveau appellée, et ce à l’infini. + */ +void loop() { + /* On fait clignoter la led pendant une seconde */ + digitalWrite(LED_BUILTIN, HIGH); + delay(500); + digitalWrite(LED_BUILTIN, LOW); + delay(500); +}