LCD Display: Iot Practicals

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

LCD DISPLAY

IOT PRACTICALS
CONNECTIONS
• // include the library code:
• #include <LiquidCrystal.h>
PROGRAM-message
• // Creates an LCD object. Parameters: (rs, enable, d4, d5, d6, d7)
• LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
display
• void setup()
• {
• // set up the LCD's number of columns and rows:
• lcd.begin(16, 2);

• // Clears the LCD screen


• lcd.clear();
• }

• void loop()
• {
• lcd.setCursor(0, 0);// Print a message to the LCD.
• lcd.print(" Hello world!");
• }
SCROLLING TEXT
• #include <LiquidCrystal.h>

• // Creates an LCD object. Parameters: (rs, enable, d4, d5, d6, d7)

• LiquidCrystal lcd(12, 11, 5, 4, 3, 2);


• void setup()
• {
• lcd.begin(16, 2);
• // Print a message to the LCD.

• lcd.setCursor(0,0);
• lcd.print(" WELCOME TO DECT ");
• }
• void loop()
• {
• lcd.setCursor(16,1);
• lcd.autoscroll(); // Set diplay to scroll automatically
• lcd.print(" "); // set characters
• delay(700);
• }

You might also like