Pages: [1]   Go Down
Author Topic: Put serial input string on an LCD screen  (Read 262 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is my current program:
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
char prevValue;

void setup() {
    lcd.begin(16, 2);

void loop() {
  if (Serial.available() > 0) {
    char value =;
    if (prevValue != value){
      prevValue = value;

When you type in any char in the serial monitor, it will print it on my LCD screen.
Now I want to make it read an entire string.  Also, the part of my program that listens for a new char to change the screen will not work if the inputted char is the same as the previous one. Any suggestions/help?
« Last Edit: January 26, 2013, 12:45:46 pm by lawm » Logged

East Anglia (UK)
Offline Offline
Faraday Member
Karma: 118
Posts: 4336
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What line ending, if any, do you have selected in the serial monitor ?

Do you want the user to type a string, press Return and for the string to appear on the LCD or is each character entered individually followed by Return ? 

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Pages: [1]   Go Up
Jump to: