Skip to main content

Project Six – LCD Demonstration

Now it is time to demonstrate the LCD module and matching Grove units. With the LCD you can display data or messages within the two line, eight-character display. For this example, connect the wires from the following LCD sockets to the Grove Base Shield:

  • right-bottom to D1/2;

  • bottom-left to D3/4;

  • bottom-right to D5/6;

Now upload the following Arduino sketch:

// Project Six - LCD demonstration
//

#include <LiquidCrystal.h>

LiquidCrystal lcd(1,2,3,4,5,6);

void setup()
{
lcd.begin(8,2);
}

void loop()
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("01234567");
lcd.setCursor(0,1);
lcd.print("ABCDEFGH");
delay(65000);
}

The lcd.clear() functions blanks the LCD screen; lcd.setCursor() moves the cursor to (column, row); and lcd.print(“”); writes text to the cursor position on the LCD.

Tech Support & Product Discussion

Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.

Loading Comments...