ER2

Dependencies:   mbed Grove_LCD_RGB_Backlight

Files at this revision

API Documentation at this revision

Comitter:
dorian06
Date:
Wed Jun 02 07:19:57 2021 +0000
Commit message:
lcd i2c;

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 5226382bd1c3 Grove_LCD_RGB_Backlight.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Grove_LCD_RGB_Backlight.lib	Wed Jun 02 07:19:57 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/cmatz3/code/Grove_LCD_RGB_Backlight/#5ce38ef7a7db
diff -r 000000000000 -r 5226382bd1c3 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jun 02 07:19:57 2021 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+#include "Grove_LCD_RGB_Backlight.h"
+
+Grove_LCD_RGB_Backlight LCD(p28,p27);
+AnalogIn bat(p15);
+int main()
+{
+    LCD.setRGB(255, 255, 255);
+    float val;
+    char tab[20]= "Vbat =" ; //création d’une chaîne de caractères
+    while(1) {
+        LCD.clear();
+        char tab[20]= "Vbat =" ; //création d’une chaîne de caractères
+        val=bat.read( )*13.3 ; //lecture de la variable
+        sprintf(tab, "Vbat= %.2f V",val) ; //contenu de tab + val sous le format %.2f
+        LCD.print(tab) ; //affichage de la chaîne tab sur le LCD
+        wait(1);
+    }
+}
diff -r 000000000000 -r 5226382bd1c3 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Jun 02 07:19:57 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file