#includeLiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { lcd.begin(16, 2); // set up the LCD's number of columns and rows lcd.print("Hello, world!"); // print a message to the LCD } void loop() { // do nothing }
#includeLiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { lcd.begin(16, 2); lcd.print("Scrolling text:"); } void loop() { lcd.scrollDisplayLeft(); // scroll the text to the left delay(200); // wait for a short time }
#includecpp LiquidCrystal is part of the Arduino IDE (integrated development environment) package library, which can be downloaded and installed from the Arduino website.LiquidCrystal lcd(12, 11, 5, 4, 3, 2); byte heart[8] = { 0b00000, 0b01010, 0b11111, 0b11111, 0b11111, 0b01110, 0b00100, 0b00000 }; void setup() { lcd.createChar(0, heart); // define a custom character lcd.begin(16, 2); lcd.write(byte(0)); // display the custom character } void loop() { // do nothing }