I wanted to display my weather station data in other rooms in my house without using wires:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1291352241/3#3I chose a simple and cheap(AUD5.6 for tx/rx pair) 433.92 MHz link:
http://littlebirdelectronics.com/products/433mhz-rf-link-kitThey are really only meant for things like a garage door controller.
The frequency response is very limited, I run them at 2000 b/sec.
I use VirtualWire(modified) library for the Transmitter which uses a ATmega328:
http://www.open.com.au/mikem/arduino/VirtualWire.pdf//Transmitter. Sends integer as 2 bytes once per second
#include <VirtualWire.h>
#undef round
uint16_t data =0; //the integer to send
void setup()
{
vw_set_tx_pin(4);
vw_setup(); // 2000 Bits per sec
}
void loop()
{
data +=1;
uint8_t number[2] ;
number[0] = data;
number[1] = data >> 8; //send 2 bytes
vw_send(number, 2);
vw_wait_tx(); // Wait until the whole message is gone
delay(1000); //send every second
}
I further modified this library to get VirtualWireTiny library to work with the ATtiny85.
It handles receive only at 2000 b/sec.
The display is 4 digits of 7 segments. I use my SEVENtiny library.
http://arduino.cc/forum/index.php/topic,7866.0.htmlThe receive code is very simple for the ATtiny85 RX:
//Receiver. Waits to receive two bytes. Displays the integer.#include <
SEVENtiny.h>
#include <VirtualWireTiny.h>
#undef
roundvoid setup()
{
vw_set_rx_pin(3);
vw_setup();
// 2000 Bits per sec vw_rx_start();
// Start the receiver PLL running}
//end of setupvoid loop()
{
uint8_t buf[VW_MAX_MESSAGE_LEN];
//message length defined as 12 bytes uint8_t buflen = VW_MAX_MESSAGE_LEN;
vw_rx_start();
// Start the receiver PLL running if (vw_get_message(buf, &buflen))
// Non-blocking {
uint16_t data = buf[1];
data =(data <<

| buf[0];
SEVENtiny.
displayI(data);
vw_rx_stop();
}
//end of got data}
//end of loop This code only uses 1756 bytes of Flash.
To program the ATtiny85 I use:
http://arduino.cc/forum/index.php/topic,59968.0.htmlThe lfuse must be set to 0xE2.
Download tinyRFlink.zip from:
http://code.google.com/p/mysudoku/downloads/list