#include <SoftwareSerial.h>
// Set up a new SoftwareSerial object with RX in digital pin 10 and TX in digital pin 11
SoftwareSerial mySerial(10, 11);
void setup() {
// Start Serial communication for debugging purposes
Serial.begin(9600);
// Set the baud rate for the SoftwareSerial object
mySerial.begin(9600);
}
void loop() {
// Check if data is available to read from SoftwareSerial
if (mySerial.available()) {
// Read the data from SoftwareSerial and print it to Serial Monitor
char receivedChar = mySerial.read();
Serial.print("Received character: ");
Serial.println(receivedChar);
}
// Other code in your loop as needed
}