multiple Rf receiver

greetings.

i recently purchased an rf 433 module.

Is it possible that 1 transmitter to transmit to several receiver?

i tried it with this code;

transmitter

//simple Tx on pin D12
//Written By : Mohannad Rawashdeh
// 3:00pm , 13/6/2013
//http://www.genotronex.com/
//..................................
#include <VirtualWire.h>
char *controller;
void setup() {
  pinMode(13,OUTPUT);
vw_set_ptt_inverted(true); //
vw_set_tx_pin(2);
vw_setup(4000);// speed of data transfer Kbps
}

void loop(){
controller="1"  ;
vw_send((uint8_t *)controller, strlen(controller));
vw_wait_tx(); // Wait until the whole message is gone
digitalWrite(13,1);
delay(10000);
controller="0"  ;
vw_send((uint8_t *)controller, strlen(controller));
vw_wait_tx(); // Wait until the whole message is gone
digitalWrite(13,0);
delay(10000);

}

Receiver

//simple Tx on pin D12
//Written By : Mohannad Rawashdeh
// 3:00pm , 13/6/2013
//http://www.genotronex.com/
//..................................
#include <VirtualWire.h>
#define TIP120pin 9
void setup()
{
    vw_set_ptt_inverted(true); // Required for DR3100
    vw_set_rx_pin(2);
    vw_setup(4000);  // Bits per sec
    pinMode(13, OUTPUT);
    pinMode(TIP120pin, OUTPUT);
    vw_rx_start();       // Start the receiver PLL running
}
    void loop()
{
    uint8_t buf[VW_MAX_MESSAGE_LEN];
    uint8_t buflen = VW_MAX_MESSAGE_LEN;

    if (vw_get_message(buf, &buflen)) // Non-blocking
    {
      if(buf[0]=='1'){

  
   digitalWrite(13,1);
   analogWrite(9,255);
      }  
   if(buf[0]=='0'){
  digitalWrite(13,0);
  analogWrite(9,0);
    }

}
}

i attached 2 uno with receivers and fan hooked up. however only 1 of it works. why is that?

Is it possible that 1 transmitter to transmit to several receiver?

Yes, anyone listening can be a receiver.

i attached 2 uno with receivers and fan hooked up. however only 1 of it works. why is that?

The usual suspects come to mind - poor connections, incorrect connections, etc. Re-check all your assembly work. If still no go, swap receivers between projects, see if the issue goes with the receiver. If still no, swap back & try the uC. etc.

I'm not sure what sort of rx/tx equipment you have, but if it's stone-simple, like the OOK units, any number of receivers ought to be ok. If it's higher level, with some protocol layers, you may need assign an ID to your receivers, and transmit to a specific receiver ID. Although I would also expect the protocols would include a broadcast mode. Check your specs.

One of the comments in your code suggests you're using the DR3100 module which is specified at 2400 baud and you appear to be running at 4000.

thanks for the replies. i re-check my connection and I'm not sure what i did but it works now :)

edited : hold up im wrong.

i assumed it works because the leds on receiver+Uno lit up when transmitter transmit.

However when i turn on the power supply for fan, the ASk receiver would not receive the transmission and AnalogWrite remains HIGH.

Could it be interference from the fan?

here's how I wire it up.

Kindly advise if I'm wrong anywhere.

bump.

help me out lovely forummers :D

Looking the comment Nr.5 especially the picture and reading the topic name sounds and looks logic
but if you want to activate and disactive multiple devices with arduino/chip giving commands from your single
controller thru radio freq. you can do it with a single RF receiver.

In the other way you can use a single transmitter sending signal thru a channel and multiple receivers can
read your data.

D.60