![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Programme de test du jeu du Fil
Dependencies: mbed Grove_LCD_RGB_Backlight
Diff: main.cpp
- Revision:
- 0:711fc0d9090e
diff -r 000000000000 -r 711fc0d9090e main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu May 12 15:06:24 2022 +0000 @@ -0,0 +1,31 @@ +#include "mbed.h" + +#include "Grove_LCD_RGB_Backlight.h" +DigitalIn E1(D2); +DigitalIn E2(D3); +DigitalIn E3(D4); + +DigitalOut Buzzer(D9); +DigitalOut Rouge(D14); +DigitalOut Verte(D15); +Grove_LCD_RGB_Backlight LCD(A4,A5); +int main() +{ + char tab[17]="LCD fonctionne"; + char tab2[17]; + LCD.setRGB(255,128,0); + Rouge.write(1); + Buzzer.write(1); + wait(1); + Buzzer.write(0); + Verte.write(1); + while(1) { + sprintf(tab2,"E1=%d/ E2=%d/ E3=%d",E1.read(),E2.read(),E3.read()); + + LCD.locate(0,0); + LCD.print(tab); + LCD.locate(0,1); + LCD.print(tab2); + wait(0.2); + } +}