From c33e05900f34159c0f5aa322398e34ad2c784955 Mon Sep 17 00:00:00 2001 From: Ricardo Date: Thu, 8 Feb 2018 22:52:04 +0000 Subject: [PATCH] Working on reading serial, RX- on pin 1 of rs422 header. --- firmware/v01/v01.ino | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/firmware/v01/v01.ino b/firmware/v01/v01.ino index a53f2a5..dee3054 100644 --- a/firmware/v01/v01.ino +++ b/firmware/v01/v01.ino @@ -80,6 +80,9 @@ void setup() { // BEGIN SETUP ------------------------------------ // set the data rate for the SoftwareSerial port mySerial.begin(4800); + // set the data rate for the Serial port + Serial.begin(4800); + // by default, we'll generate the high voltage from the 3.3v line internally! (neat!) display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3C (for the 128x32) // init done @@ -333,6 +336,8 @@ void read_serial (void) { + + // Read text from the serial window incomingByte = mySerial.read(); @@ -343,7 +348,7 @@ void read_serial (void) { lines++; chars = 0; } - display.print(incomingByte); + display.print((char)incomingByte); display.display(); delay(10);