I would like to Send and Receive both on One ESP-32DevkitC Board with this Radio modules:
https://cdn-reichelt.de/documents/daten ... _DB_DE.pdf
Does anybody have a simple "Hello Word" project for me?
I started with Library HarwdareSerial.h on Pin 17 for sending and 16 for receiving,
like this project: https://www.youtube.com/watch?v=enS7pxxBJQo
I changed this project to One HardwareSerial object:
Code: Select all
#include "HardwareSerial.h"
HardwareSerial MySerial(1);
void setup() {
MySerial.begin(9600, SERIAL_8N1, 16, 17);
Serial.begin(115200);
}
void loop() {
// Check if loop is working...
Serial.println("Loop");
// Transmit the char "h" on PIN 17. This PIN is connected to transmitter module.
MySerial.print("h");
// Expect char "h" on PIN 16. This PIN is connected to receiver module.
while (MySerial.available())
{
char c = MySerial.read();
Serial.print(c);
}
delay(1000);
}
Loop
Loop
Loop
...
What could be the problem??
Thanks
Mark