Arduino Function: SoftwareSerial.isListening

Description

Tests to see if requested software serial port is actively listening.

Syntax

mySerial.isListening()

Examples

#include <SoftwareSerial.h>

// software serial : TX = digital pin 10, RX = digital pin 11
SoftwareSerial portOne(10,11);

void setup() {
// Start the hardware serial port
Serial.begin(9600);

// Start software serial port
portOne.begin(9600);
}

void loop() {
if (portOne.isListening()) {
Serial.println("Port One is listening!");
}


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc