1

I would like to micromize my Arduino project and move it to ATTiny85. The first step was using sleep functions because I just want it to run once a day. Now I need to connect the 433Mhz stuff but I'm getting into a fight with cores vs. libraries vs. missing functions.

No matter what core and library combination I pick, there always seems to be something missing.

/home/thijs/Documents/Arduino/libraries/VirtualWire/VirtualWire.cpp:260:18: error: 'WGM12' was not declared in this scope
     TCCR1B = _BV(WGM12) | _BV(CS10);

I have tried Tiny cores, high lowtech cores and Manchester and VirtualWire libraries. I don't want to dive into the libraries and make them 'suitable' for ATTiny because I have more than one project.

How do I approach this dependency problem?

[edit]
Found a better core here: https://github.com/SpenceKonde/ATTinyCore

  • Did you check the error line? That is actually not for ATtiny85 as it does not have that Timer. It looks like there is something wrong in your setup of the IDE. – Mikael Patel Apr 4 '16 at 8:50
3

The error you posted has nothing to do with an Arduino core. This is just plain avr-libc stuff. In order to use this kind of functionality, you need to

#include <avr/io.h>

In the Arduino core, it is common to have this done by default. But if this is not the case with your chosen core, just add the #include yourself in the program.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.