//##############################################################
// # 16x2 I2C LCD Interface (Serial Connection) #
// ##############################################################
//
// Interfacing 16x2 I2C LCD display with Raspberry Pi Pico and Arduino (Hardware & Simulation)
//
// Check out the link for Code explanation and Hardware details
// Link:
// http://tech.arunkumarn.in/blogs/raspberry-pi-pico/
//
//
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Set SDA and SCL Pin
#define RP_SDA 8
#define RP_SCL 9
// I2C address (change if required)
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
// Set custom I2C pins
Wire.setSDA(RP_SDA);
Wire.setSCL(RP_SCL);
Wire.begin();
lcd.init(); // Initialize LCD
lcd.backlight(); // Turn on backlight
lcd.setCursor(0, 0);
lcd.print("Welcome to");
lcd.setCursor(0, 1);
lcd.print("Aavishkarah");
delay(3000);
}
void loop() {
for(int i = 0; i < 10; i++) {
lcd.clear();
lcd.print(i);
delay(1500);
}
}