![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Programme de test du jeu du Fil
Dependencies: mbed Grove_LCD_RGB_Backlight
main.cpp
- Committer:
- vermaelen
- Date:
- 2022-05-12
- Revision:
- 0:711fc0d9090e
File content as of revision 0:711fc0d9090e:
#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); } }