I have a program which prints to the lcd screen, I was wondering if I can have it also print to the serial monitor at the same time.
I tried serial.begin, but just got errors.
I think, you need this solution:
#include <LiquidCrystal.h>
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
void setup() {
lcd.begin(16, 2);
Serial.begin(9600);
}
void loop() {
lcd.setCursor(0, 0);
lcd.print(); // print something
Serial.println(); // print Serial
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.