Hi,
Anybody use attiny with RFM12B library? When I try to compile example send sketch gets the following error message:
D:\Arduino\arduino-1.0.5\libraries\RFM12B/RFM12B.h:200: error: 'SLEEP_MODE_STANDBY' was not declared in this scope
Any ideas?
Regards!
Hi, this is because the standby mode for attiny84 is called (SLEEP_MODE_PWR_SAVE).
You can change this in RFM12B.h. Find: void SendStart(uint8_t toNodeId, const void* sendBuf, uint8_t sendLen, bool requestACK=false, bool sendACK=false, uint8_t waitMode=SLEEP_MODE_STANDBY);
void Send(uint8_t toNodeId, const void* sendBuf, uint8_t sendLen, bool requestACK = false, uint8_t waitMode=SLEEP_MODE_STANDBY);
and change it with : #if defined(__AVR_ATtiny84__)
void SendStart(uint8_t toNodeId, const void* sendBuf, uint8_t sendLen, bool requestACK=false, bool sendACK=false, uint8_t waitMode=SLEEP_MODE_PWR_SAVE);
void Send(uint8_t toNodeId, const void* sendBuf, uint8_t sendLen, bool requestACK = false, uint8_t waitMode=SLEEP_MODE_PWR_SAVE);
#else
void SendStart(uint8_t toNodeId, const void* sendBuf, uint8_t sendLen, bool requestACK=false, bool sendACK=false, uint8_t waitMode=SLEEP_MODE_STANDBY);
void Send(uint8_t toNodeId, const void* sendBuf, uint8_t sendLen, bool requestACK = false, uint8_t waitMode=SLEEP_MODE_STANDBY);
#endif
This solves the standby issue, but when I try to send a pkt, the compiler returns a few relocation errors I don't know how to handle:
c:/arduino/arduino-1.0.5/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr25/crttn84.o:(.init9+0x2): relocation truncated to fit: R_AVR_13_PCREL against symbol `exit' defined in .fini9 section in c:/arduino/arduino-1.0.5/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/avr25\libgcc.a(_exit.o)
any suggestions?