Challenge

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);

}

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.