How to add or increase Serial Ports for NodeMCU using ESP Software Serial Library. – A blog about DIY solar and arduino projects

1) UART

UART stands for Universal Asynchronous Reception and Transmission, is a simple communication protocol that allows the Arduino to communicate with serial devices. It communicate through Rx and Tx pins and with other computer via USB port. It is also commonly applied on certain modules or equipment such as Energy Monitoring Device and even online monitoring platform such as Blynk App Web interface. Beginner or entry level board such as Arduino UNO, Nano and Mini have only 1 Serial Port. It requires 2 wires for communication.

2) I2C

I2C stands for inter-integrated-circuit, is a serial communications protocol specially designed for micro controllers communication. It is very popular among modules and sensors which could potentially connect up to 128 devices on the Arduino board. I2C makes it possible to connect multiple masters and slaves to your board using the exact same wires. The trade off for this simplified wiring is slower speeds than SPI. It requires 2 wires for communication. The most common modules that use I2C communication would be the Real Time Cloak (RTC) and the LCD Display module.

3) SPI

SPI stands for Serial Peripheral Interface. It is similar to I2C which  the communication protocol is specially designed for communication between micro controllers. Unlike I2C, SPI allows a single master device with slave devices up to 4 units only. However, SPI is much faster than I2C due to simple protocol. SPI is commonly found in modules where speed is important such as SD card module, or sometimes sensors that requires fast information changes like temperature sensors. It requires 4 wires for communication.

Different micro controller board has different pin location of communication protocols. Above is an overview for the 3 communication protocols on Arduino UNO. 

Xổ số miền Bắc