can't include RH_ASK.h when programming ATtiny85

I am getting the following error every time I try to include the RH_ASK.h to an ATtiny85 which is programmed by an Arduino uno.

C:\Users\chris\Documents\Arduino\libraries\RadioHead\RH_RF95.cpp: In member function 'bool RH_RF95::printRegisters()':

C:\Users\chris\Documents\Arduino\libraries\RadioHead\RH_RF95.cpp:258:2: error: 'Serial' was not declared in this scope

Serial.print(registers*, HEX);*

  • ^*
    exit status 1
    Error compiling for board ATtiny25/45/85.

Does an ATtiny have a hwSerial ?

The ATtiny85 doesn't have a hardware serial port, thus the error. However, ATTinyCore does provide a software serial implementation named Serial that might provide a workaround:

I'm guessing you're using damellis/attiny instead of ATTinyCore. Serial is indeed not declared in damellis/attiny because it takes very minimalist approach to ATtiny support.