by: Arduino CEO Massimo Banzi | RS Components
mypcb2015.blogspot.my
Monday, September 7, 2015
Sunday, September 6, 2015
Saturday, September 5, 2015
Friday, September 4, 2015
Connection for LCD1602 with I2C_4线连接I2C1602液晶
( click picture to enlarge )
First, adding these files to the library.
Then, connect: GND ———— GND
VCC ———— 5V
SDA ———— A4 ( SDA next to AREF )
SCL ———— A5 ( SCL next to AREF )
Lastly, copy & upload the codes below to Arduino:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
void setup()
{
lcd.init(); // initialize the lcd
lcd.backlight(); //Open the backlight
lcd.print("Welcome to "); // Print a message to the LCD.
lcd.setCursor(0,1); //newline
lcd.print("www.abcdefg.com");// Print a message to the LCD
}
void loop()
{
}
Lastly, copy & upload the codes below to Arduino:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
void setup()
{
lcd.init(); // initialize the lcd
lcd.backlight(); //Open the backlight
lcd.print("Welcome to "); // Print a message to the LCD.
lcd.setCursor(0,1); //newline
lcd.print("www.abcdefg.com");// Print a message to the LCD
}
void loop()
{
}
Subscribe to:
Posts (Atom)