Receiving Data without Receiver with VirtualWire

Hi,

first of all, sorry for my english.

But I want to receive Data from a RF Module and i can not, because i receive Noise, i think so. Because when I start the program (anything are connected), i receive rare symbols and i dont know why,

somebody know why?

Thanks !

I include what i in Serial Console received.
These is my receiver Code:

#include <VirtualWire.h>

int ledPin=13;
int rxPin =8;
void setup(){
Serial.begin(2000);
Serial.println("Arduino startet..");
pinMode(ledPin,OUTPUT);
vw_setup(10);
vw_set_rx_pin(rxPin);
vw_rx_start();
Serial.println("RF gestartet");
}

void loop()
{
 uint8_t buf[VW_MAX_MESSAGE_LEN];
 uint8_t buflen=VW_MAX_MESSAGE_LEN;
 if(true){
   vw_get_message(buf,&buflen);
 int i;
     digitalWrite(ledPin,HIGH);
     Serial.print("Got: ");
     for(i=0;i<buflen;i++)
     {
       Serial.print(buf[i],BIN);
       Serial.print(' ');
     }
     Serial.println();
     digitalWrite(ledPin,LOW);
   }
 }

Signals.JPG

Please use code tags to post code ("</>" button) and post both the transmitter and receiver code.

Start over again with the working examples for VirtualWire. There are too many problems with what you posted – it will not work.

jremington:
Please use code tags to post code ("</>" button) and post both the transmitter and receiver code.

Start over again with the working examples for VirtualWire. There are too many problems with what you posted – it will not work.

I dont have transmitter, before i used a PUTTY (in TTL) to transmitter. but i received the same

To be useful, a receiver needs a transmitter.

jremington:
To be useful, a receiver needs a transmitter.

the transmitter was a PUTTY

was so: PUTTY → RF Transmitter RF Receiver-> Arduino → COM1 but these not work,
and now i have:

Arduino → COM1 and i have the same output, but i dont know why

I have no idea what you are trying to say, or do.

jremington:
I have no idea what you are trying to say, or do.

I want to send data from PUTTY to Arduino no more but i dont receive anything

To use Virtualwire, you must have 2 Arduinos.
One doing the transmitting and one doing the receiving.
What type of transmitter and receiver are you using?

mauried:
To use Virtualwire, you must have 2 Arduinos.
One doing the transmitting and one doing the receiving.
What type of transmitter and receiver are you using?

I did these and anything..

I have these: http://www.ebay.de/itm/like/291648858582?lpid=106&chn=ps&ul_noapp=true

Great!

Post a wiring diagram (hand drawn, not Fritzing) for both your transmitting and receiving Arduinos, and post the code for both transmitter and receiver.

Then perhaps we can help.

jremington:
Great!

Post a wiring diagram (hand drawn, not Fritzing) for both your transmitting and receiving Arduinos, and post the code for both transmitter and receiver.

Then perhaps we can help.

The Diagram is in the first post.

Receiver :

#include <VirtualWire.h>

const int led_pin = 6;
const int transmit_pin = 12;
const int receive_pin = 11;
const int transmit_en_pin = 3;

void setup()
{
   delay(1000);
   Serial.begin(9600); // Debugging only
   Serial.println("setup");

   // Initialise the IO and ISR
   vw_set_tx_pin(transmit_pin);
   vw_set_rx_pin(receive_pin);
   vw_set_ptt_pin(transmit_en_pin);
   vw_set_ptt_inverted(true); // Required for DR3100
   vw_setup(2000); // Bits per sec

   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
   {
int i;

       digitalWrite(led_pin, HIGH); // Flash a light to show received good message
// Message with a good checksum received, print it.
Serial.print("Got: ");

for (i = 0; i < buflen; i++)
{
   Serial.print(buf[i], HEX);
   Serial.print(' ');
}
Serial.println();
       digitalWrite(led_pin, LOW);
   }
}

Transmiter:

#include <VirtualWire.h>

const int led_pin = 11;
const int transmit_pin = 12;
const int receive_pin = 2;
const int transmit_en_pin = 3;

void setup()
{
 // Initialise the IO and ISR
 vw_set_tx_pin(transmit_pin);
 vw_set_rx_pin(receive_pin);
 vw_set_ptt_pin(transmit_en_pin);
 vw_set_ptt_inverted(true); // Required for DR3100
 vw_setup(2000); // Bits per sec
}

byte count = 1;

void loop()
{
 char msg[7] = {'h','e','l','l','o',' ','#'};

 msg[6] = count;
 digitalWrite(led_pin, HIGH); // Flash a light to show transmitting
 vw_send((uint8_t *)msg, 7);
 vw_wait_tx(); // Wait until the whole message is gone
 digitalWrite(led_pin, LOW);
 delay(1000);
 count = count + 1;
}

I take these to test from: VirtualWire Library, for very cheap wireless communication

I solved the Problem! the receiver was in another Frecuency! :smiley: thanks for all :slight_smile: