My Dad’s having some issues with colour - his blacks are green and his reds are orange…
He is running RGB Calibrate on a WS2812B 144/M strip using:
FastLED 3.1 (downloaded today).
Arduino 1.6.5 IDE on Windows 7x
Arduino Mega2560
I recall seeing something about there being a problem with the avr-gcc compiler, but just checked and the version he’s using (4.8.1) is on the FastLED 3.1 Readme as being approved.
I am sure it’s something simple, but being 8000 miles away, the solution eludes me.
So what’s happening when “blacks are green” is that the compiler has messed with my asm timing enough that the very first bit written for a pixel is high/on, which, with GRB ordered pixels means that green ends up being on.
I have a Windows machine with 1.6.5 here that I can test with a mega this weekend and see if I can figure out what the compiler is doing to my code.
Thanks @Daniel_Garcia , I really appreciate it.
In the meantime, can you have him try pin 1 and pin 6 and pass along whether they behaving differently.
@Daniel_Garcia Pin 1 worked as normal - RGB came up as they should. Pin 6 returned the same result as before - orange, etc.
Thanks! That helps - I must still have the cycle counting for high-port pin access on the mega wrong somewhere.
He tried a bunch of other pins -pin A1 worked as well.
Try ws2811 and play around rgb config etc and don,t forget to loop ground back from power source back to the arduino otherwise results are crazee, and 470 ohm resistor to signal wire etc…and make sure that the current is enough to drive the amount of leds btw : low current = funny colours :\ white looks purple and reds look orange etc.
I think I will stick with the guy who wrote the library, thanks @Adam_bluebottleyello
He seems to know what he’s talking about… This isn’t my first FastLED rodeo…
Daniel, I tried a number of pins and it only appears to effect the PWM pins. Hope this helps.
I wonder if there’s something about the timing for those pins that’s off from my calculations - if they take 1 or 3 cycles where I’m assuming two, that would be enough to cause problems - which specific pins were problems? I hope to set up my mega this afternoon to see what’s going on.
Try grabbing the latest FastLED3.1 branch - there’s been a flurry of changes over the past few days (and make sure you don’t have other versions of FastLED floating around that arduino might be pulling from). I just checked the FastLED3.1 branch as it stands today, with pin 6, on the mega, build off of arduino 1.6.5 on a windows machine, with the following code:
#include <FastLED.h>
CRGB leds[3];
void setup() { LEDS.addLeds<WS2812,6>(leds,3); }
void loop() { LEDS.show(); delay(500); }
and in the scope each bit is exactly 1.25µs off of the mega, and a 0 bit is 252ns high and 998ns low and a 1 is 876ns high and 374ns low.
Thanks, will do. I’ll let you know.