Working on reading serial, RX- on pin 1 of rs422 header.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user