Closed enjoyneering closed 4 years ago
ESP8266 has two hardware UART. Why use a SoftSerial?
Serial.begin(9600, SERIAL_8N1); //GPIO1 (TX) and GPIO3 (RX), 9600kbps, 8-bit data, no parity, 1-bit stop
//your brilliant ESP8266 code here
Serial.swap(); //GPIO15 (TX) and GPIO13 (RX) Serial.flush(); //clear serial buffer
//your brilliant MHZ19 code here
Serial.swap(); //swap back to GPIO1 (TX) and GPIO3 (RX) Serial.flush(); //clear serial buffer
ESP8266 has two hardware UART. Why use a SoftSerial?
Serial.begin(9600, SERIAL_8N1); //GPIO1 (TX) and GPIO3 (RX), 9600kbps, 8-bit data, no parity, 1-bit stop
//your brilliant ESP8266 code here
Serial.swap(); //GPIO15 (TX) and GPIO13 (RX) Serial.flush(); //clear serial buffer
//your brilliant MHZ19 code here
Serial.swap(); //swap back to GPIO1 (TX) and GPIO3 (RX) Serial.flush(); //clear serial buffer
//your brilliant ESP8266 code here