0

Neopixel Jewel showing as white !!!
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Neopixel Jewel showing as white !!!

by jarminkhan on Tue Aug 20, 2019 8:17 pm

When I was debugging and creating this code with a friend everything was working great, but now that I"ve soldered everything up, the jewel just shows as bright white. I know some are the newer RGBW or GRBW and I've tried every combination... This is the jewel and I'll post the code below:
https://www.adafruit.com/product/2226

Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_NeoPixel.h>

// Change this line to the correct pin.
#define PIN 1

// Change this line to change the brightness.
int brightness = 40;

int totalPixels = 7;
int red = 255;
int blue = 0;

// Change this line to change the wait.
int wait = 50;

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(totalPixels, PIN, NEO_GRBW + NEO_KHZ800);

void setup() {
  pixels.begin();
  pixels.show();
}

void RedToYellow()
{
  for (int green = 0; green < 256; green++)
  {
    for (int i = 0; i < totalPixels; i++)
    {
      pixels.setPixelColor(i, red, green, blue, brightness);
    }
   
    pixels.show();
    delay(wait);
  }
}

void YellowToRed()
{
  for (int green = 255; green >  -1; green--)
  {
    for (int i = 0; i < totalPixels; i++)
    {
      pixels.setPixelColor(i, red, green, blue, brightness);
    }
   
    pixels.show();
    delay(wait);
  }
}

void loop() {
  RedToYellow();
  YellowToRed();
  delay(wait);
}

jarminkhan
 
Posts: 2
Joined: Tue Aug 20, 2019 8:16 pm

Re: Neopixel Jewel showing as white !!!

by kcl1s on Tue Aug 20, 2019 8:53 pm

You linked to a RGB Jewel. If this is what you have then you need to declare it as
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(totalPixels, PIN, NEO_GRB + NEO_KHZ800);

Then you need to use
pixels.setPixelColor(i, red, green, blue); to set pixel color.

If you need to set the overall brightness you can use this in setup
pixels.setBrightness(40);

If you post photos of the Jewel (unlit) and the wiring we can see if it is indeed an RGB and see if the wiring is an issue

Fellow hobbyist
Keith

kcl1s
 
Posts: 1460
Joined: Tue Aug 30, 2016 12:06 pm

Re: Neopixel Jewel showing as white !!!

by jarminkhan on Wed Aug 21, 2019 2:44 pm

jarminkhan wrote:When I was debugging and creating this code with a friend everything was working great, but now that I"ve soldered everything up, the jewel just shows as bright white. I know some are the newer RGBW or GRBW and I've tried every combination... This is the jewel and I'll post the code below:
https://sarkariresult.onl/ https://pnrstatus.vip/

Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_NeoPixel.h>

// Change this line to the correct pin.
#define PIN 1

// Change this line to change the brightness.
int brightness = 40;

int totalPixels = 7;
int red = 255;
int blue = 0;

// Change this line to change the wait.
int wait = 50;

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(totalPixels, PIN, NEO_GRBW + NEO_KHZ800);

void setup() {
  pixels.begin();
  pixels.show();
}

void RedToYellow()
{
  for (int green = 0; green < 256; green++)
  {
    for (int i = 0; i < totalPixels; i++)
    {
      pixels.setPixelColor(i, red, green, blue, brightness);
    }
   
    pixels.show();
    delay(wait);
  }
}

void YellowToRed()
{
  for (int green = 255; green >  -1; green--)
  {
    for (int i = 0; i < totalPixels; i++)
    {
      pixels.setPixelColor(i, red, green, blue, brightness);
    }
   
    pixels.show();
    delay(wait);
  }
}

void loop() {
  RedToYellow();
  YellowToRed();
  delay(wait);
}


my issue got solved!!

jarminkhan
 
Posts: 2
Joined: Tue Aug 20, 2019 8:16 pm

Re: Neopixel Jewel showing as white !!!

by barrysingh102 on Sat Dec 28, 2019 4:40 am

The NeoPixel is 'split', one half is the RGB you know and love, the other half is a white LED with a yellow phosphor. Unlit, it resembles an egg yolk. Lit up these are insanely bright (like ow my eye hurts) and can be controlled with 8-bit PWM per channel (8 x 4 channels = 32-bit color overall). Great for adding lots of colorful + white dots to your project!

barrysingh102
 
Posts: 1
Joined: Sat Dec 28, 2019 4:39 am

Please be positive and constructive with your questions and comments.