Can't get the rc-switch library to work.


I'm trying to capture some rf codes, but I can't get a response from the arduino at all. If the protocol is not known I thought that it would say: "Unknown protocol" and then some information about the received message.

I've flashed the sampel program, so it shouldn't be the codes fault. I'm using the rf 3400 arm mcu receiver. Picture

Any help is appreciated! :)

Is your receiver the same frequency as the signal source?

INTP: Is your receiver the same frequency as the signal source?

Yes, I've connected a LED to the data-pin on the receiver just to check if it's recognizing something. And it does.

What RF modules are you using? The link to a google search page isn't really helpful.

Post the code you are using. Just because someone puts sample code online does not mean it works. Where did you get the code? Just because you got it from the eBay or AliExpress seller doesn't mean it works.

Hi, im using this transciever: 433MHz Superheterodyne RF Link kit 3400 ARM MCU Transmitter & Receiver

And i'm using the example code which comes with the library.

How about you search for the piece you bought, and provide us a link to it so we are not guessing?
And post your code, not a link to a tutorial online.
Use the code tags. </>

Thank you for your help!

Here’s a link to the components I’ve tried:
422MHz Superheterodyne RF Link kits 3400 ARM MCU Transmitter and Receiver
STX882 ASK Transmitter Module+SRX882 Superheterodyne Receiver Module &Antenna

Here’s my code snippet.


  Hacked from

  by @justy to provide a handy RF code sniffer

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

void setup() {
  mySwitch.enableReceive(0);  // Receiver on interrupt 0 => that is pin #2

void loop() {

  if (mySwitch.available()) {

    int value = mySwitch.getReceivedValue();

    if (value == 0) {
      Serial.print("Unknown encoding");
    } else {

     Serial.print("Received ");
      Serial.print( mySwitch.getReceivedValue() );
      Serial.print(" / ");
      Serial.print( mySwitch.getReceivedBitlength() );
      Serial.print("bit ");
      Serial.print("Protocol: ");
      Serial.println( mySwitch.getReceivedProtocol() );




Do you need more stuff? And, thanks again for the help (: