I got this RF tx and rx pair: http://www.bitsbox.co.uk/sensors.html (scroll to the bottom)
here is the datasheet for the transmitter: http://www.bitsbox.co.uk/data/AMRT4_433.pdf
here is the datasheet for the receiver: http://www.bitsbox.co.uk/data/AM-HRR433.pdf
Can someone please guide me as to how i cant connect them to the arduinos and a simple example code maybe?
Thanks in advance.
Look for the VirtualWire library.
Thankyou, i installed the library and connected my circuits to the arduinos. but there is a problem my transmitter sends a char "hello", but my receiver gets a "Got: 68 65 6C 6C 6F " 
the code for tranmitter:
#include <VirtualWire.h>
void setup()
{
Serial.begin(9600); // Debugging only
Serial.println("setup");
// Initialise the IO and ISR
vw_set_ptt_inverted(true); // Required for DR3100
vw_setup(2000); // Bits per sec
}
void loop()
{
const char *msg = "hello";
digitalWrite(13, true); // Flash a light to show transmitting
vw_send((uint8_t *)msg, strlen(msg));
vw_wait_tx(); // Wait until the whole message is gone
digitalWrite(13, false);
delay(200);
}
receiver:
#include <VirtualWire.h>
void setup()
{
Serial.begin(9600); // Debugging only
Serial.println("setup");
// Initialise the IO and ISR
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(13, true); // Flash a light to show received good message
// Message with a good checksum received, dump it.
Serial.print("Got: ");
for (i = 0; i < buflen; i++)
{
Serial.print(buf[i], HEX);
Serial.print(" ");
}
Serial.println("");
digitalWrite(13, false);
}
}
That's because you are printing the received characters as hexadecimal numbers. Try Serial.write(buff[1]).
Thankyou but please could you be a bit more specific. where should i put this line?
Just a wild guess, but I'd say in place of this
Serial.print(buf*, HEX);*
______
Rob
adilmalik:
Thankyou but please could you be a bit more specific. where should i put this line?
In the receiver, change:
for (i = 0; i < buflen; i++)
{
Serial.print(buf[i], HEX);
Serial.print(" ");
}
to
for (i = 0; i < buflen; i++)
Serial.write(buf[i]);
The second Serial.print() line was there to put spaces between the numbers. Now that there is only one statement inside the 'for' loop statement, the brackets aren't needed anymore.