Chat here about code rewrites, mods, etc... with respect to the github project https://github.com/esp8266/Arduino

Moderator: igrr

User avatar
By Charly86
#21394 Hi There,

Seems plieningerweb has done a great job with software uart (with RS485 feature). See on github https://github.com/plieningerweb/esp8266-software-uart

May be worth to integrate his lib into the Core Lib of Arduino IDE, I would certainly the first testing for this feature ;-)

Can be a good point, because I've got a device that speak continuous to the serial and I neeed to disconnect it each time to be able to flash ESP8266
User avatar
By tytower
#21447 Is this similar to SoftwareSerial as used in Arduino ?

This from Github ESP8266/Arduino - Read me
Serial

Serial object works much the same way as on a regular Arduino. Apart from hardware FIFO (128 bytes for TX and RX) HardwareSerial has additional 256-byte TX and RX buffers. Both transmit and receive is interrupt-driven. Write and read functions only block the sketch execution when the respective FIFO/buffers are full/empty.

Serial uses UART0, which is mapped to pins GPIO1 (TX) and GPIO3 (RX). Serial may be remapped to GPIO15 (TX) and GPIO13 (RX) by calling Serial.swap(); after Serial.begin();. Calling swap again maps UART0 back to GPIO1 and GPIO3.

Serial1 uses UART1 which is a transmit-only UART. UART1 TX pin is GPIO2. To use Serial1, call Serial1.begin.

By default the diagnostic output from WiFi libraries is disabled when you call Serial.begin. To enable debug output again, call Serial.setDebugOutput(true);. To redirect debug output to Serial1 instead, call Serial1.setDebugOutput(true);.

Both Serial and Serial1 objects support 5, 6, 7, 8 data bits, odd (O), even (E), and no (N) parity, and 1 or 2 stop bits. To set the desired mode, call Serial.begin(baudrate, SERIAL_8N1);, Serial.begin(baudrate, SERIAL_6E2);, etc.


However if you feel this would be useful then I suggest you go to the ESP8266/Arduino site and write a new issue and see what Igrr thinks.I am sure he could get it in easily enough.
User avatar
By Charly86
#21620 Yes it's the same as Arduino SoftwareSerial, if fact it's not an issue, and as it has been requested that code change requests should be posted there, I've done it (this makes sense since it't more a new feature than an issue ;-)