Commits

F Malpartida  committed 47131bb

Edited online

  • Participants
  • Parent commits 2b5553d

Comments (0)

Files changed (1)

 
 Here's of how to use the library for a 4 bit LCD interface:
 {{{
-#!C++
+#!C
 
 #include <LiquidCrystal.h>
 #include <LiquidCrystal_4bit.h>
 
 Here's of how to use the library for a I2C LCD interface using the I2CLCDextraIO board or similar:
 {{{
-#!C++
+#!C
+#include <Wire.h> 
+#include <LiquidCrystal_I2C.h>
 
+LiquidCrystal_I2C lcd(0x38);  // Set the LCD I2C address
+
+#define BACKLIGHT_PIN     13
+
+void setup()
+{
+  // Switch on the backlight
+  pinMode ( BACKLIGHT_PIN, OUTPUT );
+  digitalWrite ( BACKLIGHT_PIN, HIGH );
+  
+  lcd.begin(16,2);               // initialize the lcd 
+
+  lcd.home ();                   // go home
+  lcd.print("Hello, ARDUINO ");  
+  lcd.setCursor ( 0, 1 );        // go to the next line
+  lcd.print (" WORLD!  ");      
+}
+
+void loop()
+{
+
+}
 }}}
 Have fun!