Dear Forum,
I have a Wemos D1 mini and would like to use an MHz receiver and an FS1000A transmitter.
Since both are 5V modules, I connect the 5V pin from the Wemos to the modules and use a voltage divider to reduce the data input to 3V for each.
I am following this tutorial as a guide:
Mein Schalplan:
Unfortunately, I do not get any output when I press buttons on my remote control nearby.
hat's why I created a simple sketch that sends and receives data.
#include <Arduino.h>
#include <RCSwitch.h>
// Sender und Empfänger-Objekte
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(9600);
// Sender auf Pin D8 (GPIO 15)
mySwitch.enableTransmit(15);
// Empfänger auf Pin D2 (GPIO 4)
mySwitch.enableReceive(4);
Serial.println("Setup abgeschlossen. Sender und Empfänger bereit.");
}
void loop() {
// Signal senden
Serial.println("Sende Signal: 123456789");
mySwitch.send(123456789, 24); // Signal mit 24 Bit senden
delay(1000); // Warte eine Sekunde, um das Signal zu senden
// Signal empfangen
if (mySwitch.available()) {
unsigned long receivedValue = mySwitch.getReceivedValue();
if (receivedValue == 0) {
Serial.println("Ungültiges Signal empfangen.");
} else {
Serial.print("Empfangenes Signal: ");
Serial.println(receivedValue);
}
mySwitch.resetAvailable();
} else {
Serial.println("Kein Signal empfangen.");
}
delay(1000); // Warte eine Sekunde, bevor die nächste Schleife beginnt
}
thank you for your help
