Hi guys...I'm trying to have arduino be able to split an input so that part of it goes to one LCD screen the other part goes to another LCD screen. I'm probably going to have 13-20 screens altogether.
I'm using the SparkFunSerLCD library to do this and I want to be able to send for eg; "hi my name is arduino" and have:
"hi" on the 1st LCD,
"my" on the 2nd LCD,
"name" on the 3rd LCD,
"is" on the 4th LCD,
"arduino" on the 5th LCD
So far, i've tried with 2 LCD screens, and it's not really working. I hope someone can assist me with this issue. (im a newbie)
I basically was testing if there's a space, and if there is, send to the next LCD =\
Here's what i have so far:
#include <SoftwareSerial.h>
#include <SparkFunSerLCD.h>
SparkFunSerLCD led_4(4,2,16);// desired pin, rows, cols
SparkFunSerLCD led_5(5,2,16);
char val; // Data received from the serial port
int col4=1;
int col5=1;
void setup () {
led_4.setup();
led_5.setup();
Serial.begin(9600);
}
void loop ()
{
if (Serial.available()>0) // If data is available to read,
{
val = Serial.read(); // read it and store it in val
col4++;
if (col4 == 16)
{
led_4.empty();
delay(100);
col4 = 1;
}
col5++;
if (col5 == 16)
{
led_5.empty();
delay(100);
col5 = 1;
}
if (val == ' ')
{
led_4.at(2,col4,val);
}
else
{
led_5.at(2,col5,val);
}
}
}
Any help would be greatly appreciated.
Thank you