RF Link with Manchester library

Hello,

I'm currently trying to get a 434 MHz RF Link between my Arduino UNO (as receiver) and an Attiny85(as transmitter), using the Manchester library of carl47. I followed this tutorial Mchr3k - Arduino: Wireless sensor node - rf link working (2), but unfortunately I can't succeed in compiling this basic sketch :

#include <MANCHESTER.h>

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

unsigned int Tdata = 0;  //the 16 bits to send

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

void loop()
{
 Tdata +=1;
 MANCHESTER.Transmit(Tdata);
 delay(100);
}//end of loop

I get the following errors:

/home/valere/sketchbook/libraries/Manchester/MANCHESTER.cpp: In constructor ‘MANCHESTERClass::MANCHESTERClass()’:
/home/valere/sketchbook/libraries/Manchester/MANCHESTER.cpp:42: erreur: ‘TCCR2A’ was not declared in this scope
/home/valere/sketchbook/libraries/Manchester/MANCHESTER.cpp:43: erreur: ‘TCCR2B’ was not declared in this scope
/home/valere/sketchbook/libraries/Manchester/MANCHESTER.cpp:44: erreur: ‘TIMSK2’ was not declared in this scope
/home/valere/sketchbook/libraries/Manchester/MANCHESTER.cpp: In member function ‘unsigned int MANCHESTERClass::Receive()’:
/home/valere/sketchbook/libraries/Manchester/MANCHESTER.cpp:85: erreur: ‘TCNT2’ was not declared in this scope
/home/valere/sketchbook/libraries/Manchester/MANCHESTER.cpp:126: erreur: ‘TCNT2’ was not declared in this scope

Thank for any helpful answer !

Are you using 1.0? If so, try changing WProgram.h to Arduino.h in MANCHESTER.h

Thanks for your answer. No, I'm using 0022. However I tried your trick on 1.0 but it doesn't work :~ Maybe is it an Attiny core problem ?

I missed that important clue. The ATTiny85 doesn't have a Timer2, so it isn't a surprised code for it that uses Timer2 won't compile.

It's a little bit strange because I selected the internal 8Mhz clock to be used instead of the 1MHz by burning the bootloader, so it should normally compile.

The page you link to has lots of interesting information and details about how to use the ATtiny. Have you followed all of the steps outlined there?

E.g.:
"The only interesting point with the main .pde file is that the #include of the MANCHESTER.h file uses "" instead of <> (#include "MANCHESTER.h"). I had to change this from the example included with the manchester.zip file."

I tried again the tutorial from the beginning and it perfectly worked (without forgetting the quote a side MANCHESTER :wink: )! Thank you for your help !

I have exactly same issue as you. How did you solve it?