mySwitch.available() always returns false with RCSwitch library

Good day, I’m trying to receive data send over a 433mHz RF transmitter on ESP-01 with the receiver on arduino uno. I’m using the RCSwitch library but the mySwitch.available() function always returns false. Please I need help on what I’m doing worng.

Receiver Code

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();
int led = 13;

void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(12);
  pinMode(led,OUTPUT);
  digitalWrite(led,0);
  Serial.println("Started");
}

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

    mySwitch.resetAvailable();
  }
}

Is this not really the same as your other thread http://forum.arduino.cc/index.php?topic=513651.msg3502028

I'm afraid its almost same; which brings me to the assumption that the whole problem is with the function.

The RCSwitch examples have lines in like this

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

It looks like the library uses interrupt zero so the input must be connected to the corresponding pin.

From HowTo_Receive · sui77/rc-switch Wiki · GitHub

With the enableReceive method the Arduino will listen to incoming signals on the external interrupt (first parameter). Note that most boards have only two external interrupts: number 0 (on digital pin 2) and 1 (on digital pin 3)

I don’t know what code to write again to make this RF receiver to work. Please can you help me with other options I might have; are there other RF libraries that can run on ESP8266-01 and arduino; can one transmit using one library and receive with another (I know this question might be stupid of me). Thanks

Connect the radio to pin 2 and use

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

would seem to be a good idea

I thought I should just send you a pix of the connections I did. Please can u kindly check it out for me ?
The red LED is connected to the data pin of the transmitter from GPIO 2 of the ESP-01 and grounded with arduino while the green LED is connected to pin 13 of arduino. As you can visibly see, the green LED never lights up while the red LED shows its transmitting.

I have finally come to the painful conclusion that I might have purchased a dozen faulty RF modules. I hard wired the ESP-01 tx pin to the arduino rx pin and got the required response. Attached are the modules in contention.

JVT:
I have finally come to the painful conclusion that I might have purchased a dozen faulty RF modules. I hard wired the ESP-01 tx pin to the arduino rx pin and got the required response. Attached are the modules in contention.

Did you try using a pin that supports an interrupt as suggested ?