Due to high demand, expect some shipping delays at this time - orders may not ship for up to 2-3 business days.
0

Single NeoPixel should be near White but is very Yellow
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Single NeoPixel should be near White but is very Yellow

by westfw on Sun Dec 12, 2021 8:14 pm

Just pointing out that the CircuitPython code and the Arduino code for b;asting out the bitstream are substantially different.

I checked and instrumented the Arduino code; there isn't any color correction in there - when I type "9 9 10" in my test sketch, that's what the guts of show actually try to send...

westfw
 
Posts: 1871
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Re: Single NeoPixel should be near White but is very Yellow

by westfw on Sun Dec 12, 2021 8:50 pm

Aha! I think I've got it.

You want the supply voltage to the pixel.

This was a clue!

On QT Py, the neopixel is powered by an output pin of the SAMD, but the SAMD output pin is never configured for high output drive, so the neopixel ends up underpowered.

Try adding this line your your setup() code:

Code: Select all | TOGGLE FULL SIZE
  PORT->Group[0].PINCFG[15].bit.DRVSTR = 1;  // turn up neopixel power

westfw
 
Posts: 1871
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Re: Single NeoPixel should be near White but is very Yellow

by adafruit2 on Sun Dec 12, 2021 10:04 pm

thanks @westfw - we can get this fixed up in future releases to make sure DRVSTR is higher
that said....we *are* underdriving the neopixel voltage. so your best bet is to tweak down the red if you want a pure white - we aren't using this LED as a color-true illumination, its more of a multi-color indicator that doesnt use 3 PWM channels :)

adafruit2
Site Admin
 
Posts: 20869
Joined: Fri Mar 11, 2005 7:36 pm

Re: Single NeoPixel should be near White but is very Yellow

by swooby on Sun Dec 12, 2021 10:15 pm

westfw wrote:Aha! I think I've got it.

You want the supply voltage to the pixel.

This was a clue!

On QT Py, the neopixel is powered by an output pin of the SAMD, but the SAMD output pin is never configured for high output drive, so the neopixel ends up underpowered.

Try adding this line your your setup() code:

Code: Select all | TOGGLE FULL SIZE
  PORT->Group[0].PINCFG[15].bit.DRVSTR = 1;  // turn up neopixel power


That fixes it! You rock!

I would expect that to either:
1) be default Arduino board library's boot behavior for the 16th pin (0 based pin #15).
-or-
2) be clearly documented that it is needed in the Arduino guides (https://learn.adafruit.com/adafruit-qt- ... rduino-ide).

Is...
Code: Select all | TOGGLE FULL SIZE
PORT->Group[0].PINCFG[15].bit.DRVSTR = 1;

...the best way to write that code, or is there a better API way to set that value?

I also noticed that there is no capacitor on the neopixel and was wondering if that could cause an issue...unless the 16th pin has any sort of internal capacitor.

swooby
 
Posts: 67
Joined: Wed Jun 19, 2019 4:09 pm

Re: Single NeoPixel should be near White but is very Yellow

by swooby on Sun Dec 12, 2021 10:49 pm

adafruit2 wrote:thanks @westfw - we can get this fixed up in future releases to make sure DRVSTR is higher
that said....we *are* underdriving the neopixel voltage. so your best bet is to tweak down the red if you want a pure white - we aren't using this LED as a color-true illumination, its more of a multi-color indicator that doesnt use 3 PWM channels :)


Understood; Feedback from a "I still consider myself a noob" is that I look at that built-in neopixel as a stepping stone to get more familiar with how to control a single pixel before graduating to controlling to larger strips or matrices.
If there is something unique about controlling that pixel that does not scale to the standard way a neopixel is controlled or driven, then that would be nice to mention and educate in a guide.

swooby
 
Posts: 67
Joined: Wed Jun 19, 2019 4:09 pm

Re: Single NeoPixel should be near White but is very Yellow

by adafruit2 on Sun Dec 12, 2021 10:53 pm

we're gonna fix it, so just keep your board updated when the ide tells you to later this week :)

adafruit2
Site Admin
 
Posts: 20869
Joined: Fri Mar 11, 2005 7:36 pm

Re: Single NeoPixel should be near White but is very Yellow

by westfw on Mon Dec 13, 2021 12:07 am

Bug report: https://github.com/adafruit/ArduinoCore-samd/issues/311
and patch: https://github.com/adafruit/ArduinoCore-samd/pull/312

Frequently, it can take "a while" to distinguish between actual bugs, and misunderstandings of expected behavior.
Swooby's post showed up shortly after I had noticed color problems of my own with a QTPy. Originally I had shrugged them off, but this caused be to take a more careful look!

westfw
 
Posts: 1871
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Re: Single NeoPixel should be near White but is very Yellow

by swooby on Mon Dec 13, 2021 1:13 am

Thanks everyone, and Happy Holidays and Merry Christmas!

swooby
 
Posts: 67
Joined: Wed Jun 19, 2019 4:09 pm

Re: Single NeoPixel should be near White but is very Yellow

by swooby on Wed Dec 15, 2021 5:06 pm

w00t!
https://github.com/adafruit/ArduinoCore-samd/pull/313
Almost there.

Again, thanks all!

swooby
 
Posts: 67
Joined: Wed Jun 19, 2019 4:09 pm

Please be positive and constructive with your questions and comments.