Im having issue compiling when using my tiny85. I can upload other sketches like the neopixel and they work fine but i can’t get any FastLED sketches working on the tiny85.
Below is the error which I’m almost sure has something todo with the clock speed of the tiny85 but i can’t seem to find a way to define it or any sample codes to help me figure it out.
fastledintro.cpp.o: In function ClocklessController_Trinket<(unsigned char)2, 2, 5, 3, (EOrder)10, 50>::showRGBInternal_AdjTime(int, bool, int, unsigned char, unsigned char const*)': /Users/larry/Downloads/DigisparkArduino-MacOSX-1.0.4-May19/DigisparkArduino-MacOSX-1.0.4-May19/DigisparkArduino.app/Contents/Resources/Java/libraries/FastLED/clockless_trinket.h:83: undefined reference totimer0_millis’
/Users/larry/Downloads/DigisparkArduino-MacOSX-1.0.4-May19/DigisparkArduino-MacOSX-1.0.4-May19/DigisparkArduino.app/Contents/Resources/Java/libraries/FastLED/clockless_trinket.h:83: undefined reference to timer0_millis' /Users/larry/Downloads/DigisparkArduino-MacOSX-1.0.4-May19/DigisparkArduino-MacOSX-1.0.4-May19/DigisparkArduino.app/Contents/Resources/Java/libraries/FastLED/clockless_trinket.h:83: undefined reference totimer0_millis’
/Users/larry/Downloads/DigisparkArduino-MacOSX-1.0.4-May19/DigisparkArduino-MacOSX-1.0.4-May19/DigisparkArduino.app/Contents/Resources/Java/libraries/FastLED/clockless_trinket.h:83: undefined reference to timer0_millis' /Users/larry/Downloads/DigisparkArduino-MacOSX-1.0.4-May19/DigisparkArduino-MacOSX-1.0.4-May19/DigisparkArduino.app/Contents/Resources/Java/libraries/FastLED/clockless_trinket.h:83: undefined reference totimer0_millis’
fastledintro.cpp.o:/Users/larry/Downloads/DigisparkArduino-MacOSX-1.0.4-May19/DigisparkArduino-MacOSX-1.0.4-May19/DigisparkArduino.app/Contents/Resources/Java/libraries/FastLED/clockless_trinket.h:83: more undefined references to `timer0_millis’ follow
First thing to know is that the compiler for the Tiny does not know anything about how the Tiny is actually configured.
Firstly the compiler: there are some comments about this on the Google Code web site and should have been fixed middle of last year. Are you using the latest version of the FastLED software?
Note that the latest release (version 2 with no RC numbers) has been renamed FastLED from FastSPILED and is downloaded from Github and not Google. See other recent posts on Google+.
The second point is that you need to configure / program your Tiny before you can use it. You don’t say what programmer you have for your Tiny and certain features can only be programmed with special programmers.
You will need to read up on the datasheet (download from Atmel website) for your Tiny to work out what needs to be permanently configured on the Tiny. Things like clock source, dividers, brownout sensing, start-up delays and so on. Then you need to check that your programmer and software combination can do this and if it can, how to do it. This only needs to be done once (normally) after you take delivery of your Tiny processor. Normal programming of your code can then be re-done as needed using the tools you have (as you say you have done test programs).
As you have the Neo stuff running, it is quite likely that the current configuration of your Tiny is pretty much correct and may not need to be altered. And is probably only down to the FastLED library version.
It is a bit beyond this forum to discuss lower level Tiny configurations but if you want to contact me directly, I might be able to assist.
I’ve faced this problem, when tried to upload sketches to bare attiny with arduino-attiny library wich is located on google code, and when i found MIT library, which is located on github all this issues were fixed for me.
The problem is the digispark library is slightly different from the arduino library when it comes to the timer side of things - which is what is causing your compile error. I will have to explicitly add support for the digispark.
Yup, Daniel’s exactly right. I forget at times there are multiple attiny cores out there. Perhaps the most “official” one is what Ivan mentions, since it’s maintained by Dave Mellis, one of the Arduino team (though I’m not sure ATtiny support will ever make it into the official Arduino distro).
Arduino 1.5 changes how boards are specified, so if you get errors like “arduino core not found” in Arduino 1.5, it’s because your board definitions are the old format.
Actually, the only attiny support work that we’ve done has been for the adafruit gemma/trinket. (And they’re the only attiny platforms that we’ve listed as supported on the docs page).