Challenge

Project 1 - Interfacing a 16*2 LCD with Arduino using I2C protocol

Project -1: Interfacing the a 16*2 LCD with aurdino using I2c protocal

#include <wire.h>

#include <LiquidCrystal.h>

LiquidCrystal lcd(13,12,5,4,3,2);

void setup()

{

Serial.begin(9600);

lcd.begin(16,2);

Wire.begin(1);

Wire.onReceive(myfunction);

}

void myfunction(int p)

{

int a=Wire.read();

lcd.setCursor(4,0);

lcd.print(a);

delay(500);

}

void loop()

{

}

program of Aurdino_2

#include<Wire.h>

void setup()

{

Serial.begin(9600);

Serial.println("master");

Wire.begin();

}

void loop()

{

int mydata=18;

Wire.beginTransmission(1);

Wire.write(mydata);

Wire.endTransmission();

}

Link Details :

https://www.tinkercad.com/things/8S7y1QI2uoQ-ingenious-jaban-bruticus/editel?sharecode=CVV-ziAF9N-3H3NRFxzLTAVUuFZI-hC6LoJ3CpXqM4M

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.