Transmitter receiver problem

I am having some trouble with this device from ebay:

For starters I really have no idea which of two central pins is the data pin on the receiver - its just not clear the way the word ‘DATA’ is printed on the circuit board.

I am trying ti use the devices with the virtualwire library and send a short text message between them.

I can’t tell if my message “trigger” is even being sent by my sending arduino uno.
And even if the text is being sent successfully, my receiving Arduino is not responding.

I have created my sketch in a way that allows me to upload it to both the sender and the receiver arduinos.

Whether each behaves as a sender or a receiver is determined by the state of the pin A0 - the sending arduino has its A0 pin connected to 3.3V via a resistor.

Is there anyting wrong with the way I am using the virtualwire library in my sketch?

PetLocator.ino (2.49 KB)

boylesg:
Whether each behaves as a sender or a receiver is determined by the state of the pin A0 - the sending arduino has its A0 pin connected to 3.3V via a resistor.

But why use a resistor? Analog inputs are high impedance anyway - you only need to connect A0 to 3v3 via a wire. Also, why not use 5V instead of 3V3?

A literal 5 second google search gives the answer to your RX pinout question:

As for your code, what is the point of using an ISR for transmitting a signal?

Power_Broker:
But why use a resistor? Analog inputs are high impedance anyway - you only need to connect A0 to 3v3 via a wire. Also, why not use 5V instead of 3V3?

A literal 5 second google search gives the answer to your RX pinout question:

As for your code, what is the point of using an ISR for transmitting a signal?

Used a resistor out of habit with the digital pins - was not specifically aware that analog pins had high impedance.

The ISR is triggered when you hit a button which in turn results in the signal being sent.

I specifically don't want the signal being sent continuously in loop() and I figured an ISR with a flag seems more efficient than continuously reading a digital pin in loop.

I was just serial printing the state of the data pin on my receiver and it seems to randomly float between 0 and 1, even without sending any text from the sending arduinio.

Don't suppose you know what that is about do you?

Are Wifi or mobile signals likely to effect these devices?

boylesg:
I was just serial printing the state of the data pin on my receiver

I'm still confused. Let's say the button is not pressed. What EXACTLY is sent to the radio for transmission? Conversely, when the button is pressed, what EXACTLY is sent to the radio for transmission?

Are you transmitting logic low for button not pressed and logic high for button pressed, or are you actually trying to send a string of characters as "text"?

boylesg:
it seems to randomly float between 0 and 1, even without sending any text from the sending arduinio.

Did you use a pullup resistor on the pin used for the button? Sounds like that's what's doing it. Can you post a hand-drawn schematic?

boylesg:
Are Wifi or mobile signals likely to effect these devices?

No, your module is a 433MHz module and wifi is 2.4GHz. They do not interfere.

Nothing is sent to the receiver unless I press the button......or in the interim connect the pin briefly to GND with a wire.

Pullup resistor...yes - pinMode(..., INPUT_PULLUP);

I don't know what the issue is with the virtualwire library but I found that the radiohead library works with these modules nicely: http://randomnerdtutorials.com/rf-433mhz-transmitter-receiver-module-with-arduino/

I can send and receive a short string nicely.

boylesg:
I was just serial printing the state of the data pin on my receiver and it seems to randomly float between 0 and 1, even without sending any text from the sending arduinio.

With no tranmitted signal to lock onto and receive the RX produces random noise ?

boylesg:
Are Wifi or mobile signals likely to effect these devices?

Depends how close the Wifi or mobile is to the RX.

Both are realtivly powerful transmitters and if close enough to the RX could swamp its RF front end and prevent it working.

srnet:
With no tranmitted signal to lock onto and receive the RX produces random noise ?

Oh. I assumed it would be GND'ed some how who like you generally do with arduino pins.

Did you attach any antennas?