The 86Duino hardware has built-in support for serial communication on pins 0 and 1. The native serial support happens via a piece of hardware (built into the chip) called a UART. This hardware allows 86Duino’s CPU to receive serial communication even while working on other tasks.

The SoftwareSerial library has been developed to allow serial communication on other digital pins of the Arduino, using software to replicate the functionality (hence the name 'SoftwareSerial '). It is possible to have multiple software serial ports with speeds up to 115200 bps. SoftwareSerial Library Download: SoftwareSerial is included with Arduino Real UART Serial The hardware UART Serial port should always be used, if possible, before considering SoftwareSerial. On Teensy, the hardware UART serial port completely separate from the USB port.

The SoftwareSerial library allows serial communication on other digital pins of the 86Duino, using software to replicate the functionality (hence the name “SoftwareSerial”). A parameter enables inverted signaling for devices which require that protocol.

This library is included in 86Duino Coding 103 and later.

Limitations

The library has the following known limitations:

  • If using multiple software serial ports, only one can receive data at a time.
  • Not all pins on 86Duino support change interrupts, so only the following can be used for RX: 18, 19, 20, 33, 34, 35, 36, 37, 38, 42, 43, 44.
  • The maximum supported baudrate is 19200 bps.

Example

Functions

SoftwareSerial()
available()
begin()
isListening()
overflow()
peek()
read()
print()
println()
listen()
write()

The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

In certain cases we need to use more than one Serial port in the case of arduino, I use the arduino mega 2560 which has 4 serial ports including the programming port, in the case of arduino’s as the nano has a single programming port and as a solution Have created the softwareserial library, given the incompatibility of certain functions the softwareserial library for arduinodoes not work on esp8266.

Softwareserial Library

I have tested with ESP8266 NodeMCU and SoftwareSerial library of the espsoftwareserial repository created or supplied by plerupthanks for your contribution to the community.

Recommendations

In the case that these libraries that create a uart in code must be taken into account that at high speeds it is possible to have bit errors since they use interrupts and the microcontroller you are in many tasks at a time, in my case and the tests that I have I configured the port at Maximo 9600 Bauds, it is a relatively low speed but I consider it to be safe.

Buy it here: Module ESP8266 NodeMCU v3 WIFI 4Mb

Download Softwareserial Library For Arduino

Test

To verify the operation of the softwareserial library, I downloaded the library for espand I have temporarily replaced the serial software version for arduino.

Tutorial ESP8266 12E NodeMCU & SoftwareSerial

Arduino IDE Code

This test creates a bridge between the 2 serial ports.