Project 1 - Interfacing a 16*2 LCD with Arduino using I2C protocol
FOR MASTER CODE IS: -
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
lcd.begin();
lcd.backlight();
}
void loop() {
lcd.clear();
lcd.print("Welcome");
lcd.setCursor (0,1);
lcd.print("Master Calls");
delay(500);
}
FOR SLAVE CODE IS: -
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
lcd.begin();
lcd.backlight();
}
void loop() {
lcd.clear();
lcd.print("Welcome");
lcd.setCursor (0,1);
lcd.print("Slave Answers");
delay(500);
}