Receiving Data from an 433Mhz RF module

Hi there,

I am currently writing some very basic code in which one Arduino tells the other arduino to flash an LED through 433Mhz RF modules. This part is working fine. The problem is that when I look at the serial, whenever the input on the receiver is high, the digital pin actually switches from between high and low.

As an example, when the receiver is receiving no signal, it returns:
Off
Off
Off
Off
Off

But when it is receiving High, it returns:
On
Off
On
Off
On
Off

Has anyone else had this problem?

Has anyone else had this problem?

No one can reproduce the problem because you didn't post any code. We have no idea is causing the messages you claim to see. We have no idea which pin you are talking about or what is connected to that pin, or even if it is an INPUT pin.

My apologies.

Transmitter code:
#define rfTransmitPin 4
#define ledPin 13

void setup(){
pinMode(rfTransmitPin, OUTPUT);
pinMode(ledPin, OUTPUT);
}

void loop(){

digitalWrite(rfTransmitPin, HIGH); //Transmit a HIGH signal
digitalWrite(ledPin, HIGH); //Turn the LED on
delay(2000); //Wait for 1 second

digitalWrite(rfTransmitPin,LOW); //Transmit a LOW signal
digitalWrite(ledPin, LOW); //Turn the LED off
delay(1);
}

Receiver Code:

#define ledPin 13 //Onboard LED = digital pin 13

// variable used to store received data
const int rfReceivePin=2;
int buttonstate;

void setup(){
pinMode(ledPin, OUTPUT);
pinMode(rfReceivePin, INPUT);
Serial.begin(9600);
}

void loop(){

buttonstate=digitalRead(rfReceivePin);

if(buttonstate == HIGH){
digitalWrite(ledPin, HIGH);
Serial.println("On");
}

if(buttonstate ==LOW){
digitalWrite(ledPin, LOW);
Serial.println("off");
}

My cheap-assed 433MHz radios are collecting dust in a bin somewhere, but when I used them, I used VirtualWire (superseded by RadioHead) to communicate with the radios. There is more to communication using them than just setting a pin state or reading the pin state.

Those cheap 433 Mhz radios wont transmit steady state data.
They need data that is continuously changing, so you need something like Virtualwire or the Radiohead libraries.

how much distance u left between tx and rx??