I'm trying to get my ATTiny13a to transmit some RF signals with an 433 MHz RF module, however the code won't compile.
My code
`#include
RH_ASK driver(2000, 4, 3);
void setup()
{
}
void loop() {
// put your main code here, to run repeatedly:
}`
Compile errors
`C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp: In member function 'virtual bool RH_Serial::available()':
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:36:34: error: invalid use of incomplete type 'class HardwareSerial'
while (!_rxBufValid &&_serial.available())
^
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
^
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:37:18: error: invalid use of incomplete type 'class HardwareSerial'
handleRx(_serial.read());
^
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
^
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp: In member function 'virtual bool RH_Serial::send(const uint8_t*, uint8_t)':
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:207:12: error: invalid use of incomplete type 'class HardwareSerial'
_serial.write(DLE); // Not in FCS
^
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
^
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:208:12: error: invalid use of incomplete type 'class HardwareSerial'
_serial.write(STX); // Not in FCS
^
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
^
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:218:12: error: invalid use of incomplete type 'class HardwareSerial'
_serial.write(DLE);
^
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
^
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:220:12: error: invalid use of incomplete type 'class HardwareSerial'
_serial.write(ETX);
^
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
^
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:224:12: error: invalid use of incomplete type 'class HardwareSerial'
_serial.write((_txFcs >> 8) & 0xff);
^
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
^
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:225:12: error: invalid use of incomplete type 'class HardwareSerial'
_serial.write(_txFcs & 0xff);
^
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
^
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp: In member function 'void RH_Serial::txData(uint8_t)':
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:232:9: error: invalid use of incomplete type 'class HardwareSerial'
_serial.write(DLE); // Not in FCS
^
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
^
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:233:12: error: invalid use of incomplete type 'class HardwareSerial'
_serial.write(ch);
^
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
^
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp: In member function 'virtual void RHHardwareSPI::attachInterrupt()':
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:49:9: error: 'class VeryTinySoftSPIClass' has no member named 'attachInterrupt'
SPI.attachInterrupt();
^
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp: In member function 'virtual void RHHardwareSPI::detachInterrupt()':
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:56:9: error: 'class VeryTinySoftSPIClass' has no member named 'detachInterrupt'
SPI.detachInterrupt();
^
exit status 1
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp: In member function 'void RH_ASK::timerSetup()':
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:311:5: error: 'TCCR1A' was not declared in this scope
TCCR1A = 0; // Output Compare pins disconnected
^
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:312:5: error: 'TCCR1B' was not declared in this scope
TCCR1B = _BV(WGM12); // Turn on CTC mode
^
In file included from c:\users\Admin\appdata\local\arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2\avr\include\avr\io.h:99:0,
from c:\users\Admin\appdata\local\arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2\avr\include\avr\pgmspace.h:90,
from C:\Users\Admin\AppData\Local\Arduino15\packages\diy_attiny\hardware\avr\2018.9.9\cores\tiny/Arduino.h:9,
from C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RadioHead.h:744,
from C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RHGenericDriver.h:9,
from C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_ASK.h:9,
from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:6:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:312:18: error: 'WGM12' was not declared in this scope
TCCR1B = _BV(WGM12); // Turn on CTC mode
^
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:319:5: error: 'OCR1A' was not declared in this scope
OCR1A = nticks;
^
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:326:5: error: 'TIMSK' was not declared in this scope
TIMSK |= _BV(OCIE1A);
^
In file included from c:\users\Admin\appdata\local\arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2\avr\include\avr\io.h:99:0,
from c:\users\Admin\appdata\local\arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2\avr\include\avr\pgmspace.h:90,
from C:\Users\Admin\AppData\Local\Arduino15\packages\diy_attiny\hardware\avr\2018.9.9\cores\tiny/Arduino.h:9,
from C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RadioHead.h:744,
from C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RHGenericDriver.h:9,
from C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_ASK.h:9,
from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:6:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:326:18: error: 'OCIE1A' was not declared in this scope
TIMSK |= _BV(OCIE1A);
^
In file included from C:\Users\Admin\AppData\Local\Arduino15\packages\diy_attiny\hardware\avr\2018.9.9\cores\tiny/Arduino.h:11:0,
from C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RadioHead.h:744,
from C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RHGenericDriver.h:9,
from C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_ASK.h:9,
from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:6:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp: In function 'void TIMER1_COMPA_vect()':
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:582:32: warning: 'TIMER1_COMPA_vect' appears to be a misspelled signal handler, missing __vector prefix [-Wmisspelled-isr]
#define RH_ASK_TIMER_VECTOR TIMER1_COMPA_vect
^
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:620:5: note: in expansion of macro 'RH_ASK_TIMER_VECTOR'
I'm trying to get my ATTiny13a to transmit some RF signals with an 433 MHz RF module, however the code won't compile.
My code `#include
RH_ASK driver(2000, 4, 3);
void setup()
{
} void loop() { // put your main code here, to run repeatedly:
}`
Compile errors `C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp: In member function 'virtual bool RH_Serial::available()':
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:36:34: error: invalid use of incomplete type 'class HardwareSerial'
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:37:18: error: invalid use of incomplete type 'class HardwareSerial'
handleRx(_serial.read());
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp: In member function 'virtual bool RH_Serial::send(const uint8_t*, uint8_t)':
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:207:12: error: invalid use of incomplete type 'class HardwareSerial'
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:208:12: error: invalid use of incomplete type 'class HardwareSerial'
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:218:12: error: invalid use of incomplete type 'class HardwareSerial'
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:220:12: error: invalid use of incomplete type 'class HardwareSerial'
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:224:12: error: invalid use of incomplete type 'class HardwareSerial'
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:225:12: error: invalid use of incomplete type 'class HardwareSerial'
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp: In member function 'void RH_Serial::txData(uint8_t)':
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:232:9: error: invalid use of incomplete type 'class HardwareSerial'
_serial.write(DLE); // Not in FCS
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:233:12: error: invalid use of incomplete type 'class HardwareSerial'
In file included from C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_Serial.cpp:6:0:
C:\Users\Admin\Documents\Arduino\libraries\RadioHead/RH_Serial.h:40:7: note: forward declaration of 'class HardwareSerial'
class HardwareSerial;
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp: In member function 'virtual void RHHardwareSPI::attachInterrupt()':
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:49:9: error: 'class VeryTinySoftSPIClass' has no member named 'attachInterrupt'
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp: In member function 'virtual void RHHardwareSPI::detachInterrupt()':
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:56:9: error: 'class VeryTinySoftSPIClass' has no member named 'detachInterrupt'
exit status 1 C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp: In member function 'void RH_ASK::timerSetup()':
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:311:5: error: 'TCCR1A' was not declared in this scope
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:312:5: error: 'TCCR1B' was not declared in this scope
In file included from c:\users\Admin\appdata\local\arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2\avr\include\avr\io.h:99:0,
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:312:18: error: 'WGM12' was not declared in this scope
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:319:5: error: 'OCR1A' was not declared in this scope
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:326:5: error: 'TIMSK' was not declared in this scope
In file included from c:\users\Admin\appdata\local\arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2\avr\include\avr\io.h:99:0,
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:326:18: error: 'OCIE1A' was not declared in this scope
In file included from C:\Users\Admin\AppData\Local\Arduino15\packages\diy_attiny\hardware\avr\2018.9.9\cores\tiny/Arduino.h:11:0,
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp: In function 'void TIMER1_COMPA_vect()':
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:582:32: warning: 'TIMER1_COMPA_vect' appears to be a misspelled signal handler, missing __vector prefix [-Wmisspelled-isr]
C:\Users\Admin\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:620:5: note: in expansion of macro 'RH_ASK_TIMER_VECTOR'
ISR(RH_ASK_TIMER_VECTOR)
Error compiling for board ATtiny13.`