LCD Hello World Program

Dependencies:   mbed TextLCD

Files at this revision

API Documentation at this revision

Comitter:
absatoufall
Date:
Wed Nov 25 08:37:08 2020 +0000
Parent:
1:99f6b4191e94
Commit message:
programmation du microcontroleur;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 99f6b4191e94 -r 15da1c028052 main.cpp
--- a/main.cpp	Tue May 27 07:30:09 2014 +0000
+++ b/main.cpp	Wed Nov 25 08:37:08 2020 +0000
@@ -1,16 +1,11 @@
 #include "mbed.h" //header file 
-#include "LCD.h"  
+
+#include "LCD.h"  // librairie TextLCD
 
-DigitalOut myled(LED1); 
-int main() {  
-while(1) {    
-LCD_init();  //initialising LCD
-   display_to_LCD(0x48); // “H‟    
-  display_to_LCD(0x45); // “E‟     
- display_to_LCD(0x4C); // “L‟     
- display_to_LCD(0x4C); // “L‟      
-display_to_LCD(0x4F); // “O‟  
-   wait(1);
+TextLCD lcd(D2,D3,D4,D5,D6,D7); 
+int main() {
+    lcd.printf("ST Nucleo L432KC"); // affichage sur la ligne 0
+    lcd.locate(0,1); // positionnement du curseur en colonne 0 et ligne 1
+    lcd.printf("Affiche. LCD 16x2");// affichage sur la ligne 1
+}
 
-}
-}