Hello everyone. I need to make an input from the console to the first line of my name and to the second last name in the LCD 16x2.
I can't figure out how to do it?
#include <LiquidCrystal.h>
LiquidCrystal lcd(5, 6, 7, 8, 9, 10);
void setup()
lcd.begin(16, 2);
Serial.begin(9600);
Serial.println("Please input only 16 characters");
}
void loop() {
if (Serial.available()) {
delay(600);
while (Serial.available() > 0) {
lcd.write(Serial.read());
}
}>
Welcome to the forum
Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'
Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination
See also FAQ - Arduino Forum for general rules on forum behaviour and etiquette.
Hello,
Welcome to the Arduino Forum.
This guide explains how to get the best out of this forum. Please read and follow the instructions below.
Being new here you might think this is having rules for the sake of rules, but that is not the case. If you don’t follow the guidelines all that happens is there is a long exchange of posts while we try to get you to tell us what we need in order to help you, which is fru…
1 Like
Koepel
April 18, 2022, 11:21am
3
Split it into two parts: reading the Serial text and writing to the display.
This is the reference for the Serial library: https://www.arduino.cc/en/reference/serial .
Try a few examples, read what the functions do, and see how far you get.
Does the LCD display work ?
Did you know that you can try the Serial and the LCD display in Wokwi simulation ?
system
Closed
October 15, 2022, 11:21am
4
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.