So I've assembled the program depicted below.
const char EOPmarker = '.'; // i changed this so i could use the keyboard and the serial monitor baked into the arduino ide to debug. My computer is slow and having to debug the vb program each time I want to test takes a long time.
char serialbuf[32];
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
void setup(){
lcd.begin(16, 2);
Serial.begin(9600);
}
void loop() {
if (Serial.available() > 0) {
delay(100);
lcd.clear();
static int bufpos = 0;
char inchar = Serial.read();
if (inchar != EOPmarker) {
serialbuf[bufpos] = Serial.read();
}
else {
serialbuf[bufpos] = 0; // null terminate
lcd.write(serialbuf);
}
bufpos++;
}
}
What is "serialbuf" because when i type
1234.
into the input line in the serial monitor in the ide, the lcd only prints
24
Again, this is not why the project is meant to do, it is a proof of concept, but the project will eventually write serial inputs to the lcd, as mentioned in above posts.