-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Hi ,
implementing the following code the serial isn't working while removing ESPVGAX code lines anything ii's ok.
Any suggestion?
#include <SoftwareSerial.h>
#include <ESPVGAX.h>
#include <fonts/monodos12.h>
ESPVGAX vga;
String messageTemp ;
String messageRcv ;
char data = 0;
int VGAy=0;
int RcvIndex=0;
//static const int RXPin = D6, TXPin = D5;
static const int RXPin = D6, TXPin = D8;
SoftwareSerial Raspi(RXPin, TXPin);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
delay (30);
Raspi.begin(9600);
delay (30);
vga.begin();
vga.setBitmapFont((uint8_t*)img_monodos12_data, 12);
Serial.println("Hello !");
}
void loop() {
// put your main code here, to run repeatedly:
if(Raspi.available()>0)
{
data=Raspi.read();
if (data == '\n'){
messageTemp += data;
messageRcv = messageTemp;
Serial.println(messageRcv);
char charBuf[messageRcv.length()+1];
messageRcv.toCharArray(charBuf,messageRcv.length()+1);
vga.print (charBuf,0, 0, true, messageRcv.length()+1, ESPVGAX_OP_SET, false, 0,false);
messageTemp = "";
VGAy += 1;
}
else {
messageTemp += data;
}
}
//Serial.println(messageTemp);
}