ESP32 DevkitC and 433Mhz Radio module not working

Markus
Posts: 6
Joined: Tue Dec 10, 2019 3:49 pm

ESP32 DevkitC and 433Mhz Radio module not working

Postby Markus » Wed Dec 18, 2019 8:02 am

Hey people,

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);
}
But I only get:

Loop
Loop
Loop
...


What could be the problem?? :? :? :?
Thanks
Mark
Last edited by Markus on Thu Dec 19, 2019 9:07 am, edited 1 time in total.

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 DevkitC and 433Mhz Radio module not working

Postby ESP_Sprite » Thu Dec 19, 2019 2:39 am

Moved to the Arduino subforum. And what output would you expect from this code?

Markus
Posts: 6
Joined: Tue Dec 10, 2019 3:49 pm

Re: ESP32 DevkitC and 433Mhz Radio module not working

Postby Markus » Thu Dec 19, 2019 9:13 am

Hi,

I have corrected the line

Code: Select all

MySerial.println
to

Code: Select all

Serial.println
.
The chars that I transmit over PIN 17 should be received on PIN 16.

Does anybody has a similar working solution for this "simple" project? I would like to exclude software problems on my side.

Thanks!!

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 DevkitC and 433Mhz Radio module not working

Postby ESP_Sprite » Thu Dec 19, 2019 10:38 am

What happens if you remove the serial radio module and short pin 16 and 17?

Who is online

Users browsing this forum: Majestic-12 [Bot] and 30 guests