I’m trying to use FastLED in its entirety for the first time (adapting a C project which used light_ws2812 so that I can use the awesome hsv2rgb_rainbow algorithm from FastLED), and I’m incredibly confused as to how to integrate it into a straight AVR project without the Arduino libraries. So far I’ve managed to cram it in by manually deleting all references to symbols from that library (and probably breaking bits of the timing code).
Is FastLED meant to work in isolation from Arduino? If so, how?
We’re heading toward no-Arduino, and we’re there in some cases already. I’ll let @Daniel_Garcia go over the details. Might be useful to have your help testing…
The design of FastLED2 was definitely intended to make moving to non-arduino environments easier, with an eye towards eventually cutting the last few strings - but, as you found, that hasn’t quite been finished off yet.
This is something that should be coming in on the FastLED3.1 branch shortly - as I’m wrapping up a contract job where I used FastLED in a completely arduino-free environment.
As long as you weren’t touching the body of showRGBInternal, you probably don’t have to worry about breaking timing code (other than, that is, your millis timer effectively being paused while writing out led data because of interrupts being disabled).
That’s what I meant by timing, what with the millis timer and interrupts and whatnot (which, incidentally, is a problem I faced making the Port Hack entryway clock[1], for which I ended up using an RTC module instead of using NTP and relying on the chip’s timer).
I’d be happy to help test it in a pure C++ environment, too.
[1]http://be-lumino.us/blog/wp-content/uploads/2014/04/Port-Hack-Clock-crop.jpg
The 3.1 branch code removes the concern about millis/timer adjustments entirely.