Attiny RF link

Hey !

I justed started out programming with the arduino , its a great product.
I wanted to make a led go on by using a arduino(as transmittor) , and a attiny45 as reciever.
Im using 434mhz modules. I tested writing code to the attiny 45 before so i know it works.

But i cant get this code to work , im using the manchester library.

Attiny

#include <MANCHESTER.h>

#define TxPin 4  //the digital pin to use to transmit data

unsigned int Tdata = 101;
unsigned int TTdata = 102; //the 16 bits to send

void setup() 
{                
MANCHESTER.SetTxPin(TxPin);      // sets the digital pin as output default 4
}//end of setup

void loop() 
{
 MANCHESTER.Transmit(Tdata);
 delay(1000);
 MANCHESTER.Transmit(TTdata);
 delay(1000);
}//end of loop
Arduino

#include <MANCHESTER.h>
int Relay(0);
int val(0);
void setup()
{
  // Set digital TX pin
  MANRX_SetRxPin(4);
  // Prepare interrupts
  MANRX_SetupReceive();
  // Begin receiving data
  MANRX_BeginReceive();
  pinMode(Relay, OUTPUT);
  Serial.begin(9600);
}

void loop()
{
if (MANRX_ReceiveComplete())
{
  unsigned int data = MANRX_GetMessage();
  MANRX_BeginReceive();  
  Serial.println(data);
}
if (Serial.read() == '101'){
  digitalWrite(Relay, HIGH);
}
if (Serial.read() == '102'){
  digitalWrite(Relay, LOW);
}
}

Michaelp1:

unsigned int Tdata = 101;

unsigned int TTdata = 102; //the 16 bits to send
...
if (Serial.read() == '101'){
  digitalWrite(Relay, HIGH);
}
if (Serial.read() == '102'){
  digitalWrite(Relay, LOW);
}

These two bits of code do not match - the character '101' is not equal to the decimal integer 101. Also, I don't understand why you are writing the value received from the radio to the serial port and then trying to read it back from the serial port. Does your RF transceiver connect to the serial port somehow?

I don't know if these are your only problems, but I can't see this working as it is. I suggest to start with you simply print a text message on Serial each time the Arduino receives a message from the radio link. This will show whether you're actually receiving anything.