- Tue Jun 23, 2015 8:22 pm
#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.