Hey guys, first time Fastled user, checking if i’m doing something wrong.
Adafruit Flora (16MHz ATmega32u4) + 16led Neopixel Ring (WS2812).
Only 5 pixels blink (0,1, 13,14,15 for some reason), and badly flicker when using the palette example. Everything works fine when using NeoPixel library.
Important parts of code:
#include <FastLED.h>
#define NUM_LEDS 16
#define DATA_PIN 12
#define LED_TYPE WS2812 (also tried NEOPIXEL)
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];
FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS);
Tried a few other combinations of initializing, but no luck. I see Flora support checked in :-\
What version of arduino are you using, and what version of the library? (I’d recommend 1.6.4 or 1.6.5 from arduino.cc and the fastled3.1 branch)
Lol well that was easy
I had ‘master’ before, switching to 3.1 made it work as expected, thank you!
@Gleb_Gudkov isn’t the flora 8Mhz?
And some of the Pro Trinkets are 12MHz.
Where can I find a technical reference saying that flora runs on 16Mhz?
Nevermind, I see that the ATmega32u4 which flora runs with is 16MHz
I see that the board definition that adafruit publish have f_cpu set to 8MHz.
Did you change that to 16MHz to make it run at that speed?
The speed is set by the on-board crystal. You can’t change your processing speed by a parameter.
@Mike_Thornbury Thanks Mike, I got the same answer from on the adafruit forums. So my conclusion from that is that the Flora runs at 8MHz.
@Mike_Thornbury depends on the board - you can change the clock speed the 5v trinket runs at with a line of code (https://learn.adafruit.com/introducing-trinket/16mhz-vs-8mhz-clock) - also the teensy 3.x gives you a variety of clock speeds.
The main reason you can’t push the flora to 16mhz is because it is running at 3.3v, which limits it to 8mhz.
But the clock crystal rarely locks you into a single clock rate.