Programme de test du jeu du Fil

Dependencies:   mbed Grove_LCD_RGB_Backlight

Files at this revision

API Documentation at this revision

Comitter:
vermaelen
Date:
Thu May 12 15:06:24 2022 +0000
Commit message:
V1

Changed in this revision

Grove_LCD_RGB_Backlight.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 711fc0d9090e Grove_LCD_RGB_Backlight.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Grove_LCD_RGB_Backlight.lib	Thu May 12 15:06:24 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/cmatz3/code/Grove_LCD_RGB_Backlight/#5ce38ef7a7db
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);
+    }
+}
diff -r 000000000000 -r 711fc0d9090e mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu May 12 15:06:24 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file