IOGS_France
/
Blink_Program
Test program - based on blink program from MBED
Diff: main.cpp
- Revision:
- 0:10cc86071dd4
diff -r 000000000000 -r 10cc86071dd4 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun Dec 05 13:08:56 2021 +0000 @@ -0,0 +1,26 @@ +/* + * Programme de test + * Auteur : J. VILLEMEJANE / Dec 2021 / IOGS + * From : MBED Example / Blinky LED + */ + +/* Déclaration des ressources externes */ +#include "mbed.h" + +/* Déclaration des variables globales */ + +/* Déclaration des entrées/sorties */ +DigitalOut myled(LED1); + +/* Fonction principale */ +int main(){ + /* Zone d'initialisation */ + + /* Boucle infinie */ + while(1){ + myled = 1; // LED is ON + wait_us(200000); // 200 ms + myled = 0; // LED is OFF + wait_us(1000000); // 1 s + } +} \ No newline at end of file