sui77 / rc-switch

Arduino lib to operate 433/315Mhz devices like power outlet sockets.
1.89k stars 651 forks source link

Esp32 issue... another one, yes... #481

Closed dvdbrk closed 1 year ago

dvdbrk commented 1 year ago

Hi all,

I am aware this question has been asked many times, but I have been trying for days now to get this to work with multiple libraries and still no luck.

I am using Simple demo sketch:

#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();

#define RXD2 27

void setup() {
  Serial.begin(9600);
  Serial.print("Ready to receive.");  

//  pinMode(RXD2, INPUT);
//  pinMode(RXD2, INPUT_PULLUP);
//  mySwitch.enableReceive(digitalPinToInterrupt(RXD2));

  mySwitch.enableReceive(RXD2); 
}

void loop() {    
  if (mySwitch.available()) {  
    Serial.print("Received ");
    Serial.print( mySwitch.getReceivedValue() );
    Serial.print(" / ");
    Serial.print( mySwitch.getReceivedBitlength() );
    Serial.print("bit ");
    Serial.print("Protocol: ");
    Serial.print( mySwitch.getReceivedProtocol() );
    Serial.print(" / ");
    Serial.println( mySwitch.getReceivedDelay() );

    mySwitch.resetAvailable();

  } else {
    Serial.println("Not available");

  }
}

And no matter what I do, I keep receiving Not available in the console.

I have verified PIN 27 is actually PIN 27 - I've used LED to test it. I have tried with both 3.3V and 5V - I have used voltmeter to make sure there is power. I have tried the same sketch with 2 different RC receivers, fresh out of the box from eBay. I have tried Esp8266, Arduino Leonardo and two Esp32 versions.

NorthernMan54 commented 1 year ago

I think your issue is documented on this page - https://www.rflink.nl/wires.php

That receiver is effectively garbage