Code Monkey home page Code Monkey logo

Comments (4)

technobly avatar technobly commented on June 26, 2024

That strip you linked to is not RGBW, but rather RGB only if it's truly SK6812 and not SK6812RGBW. They should be the same as WS2812B type.

Try

#define PIXEL_TYPE WS2812B

from particle-neopixel.

edalquist avatar edalquist commented on June 26, 2024

It has all 4 LEDs. Setting strip.Color(255, 255, 255) lights all 3 RGB LEDs, strip.Color(0, 0, 0, 255) lights the one W LED and strip.Color(255, 255, 255, 255) lights all 4 LEDs

I'll give WS2812B a try when I get home just to confirm.

from particle-neopixel.

technobly avatar technobly commented on June 26, 2024

Ok interesting. I created the SK6812RGBW pixel type support with an Adafruit RGBW 24 pixel ring and I'm sure I would have tested the color order. Referencing the datasheet, it says RGBW order which is the same as the code.

It's possible you have a knock off or just a different version and the colors need to be swapped. It would probably be best to incorporate the different pixel color arrangements as in the original library:
https://github.com/adafruit/Adafruit_NeoPixel/blob/master/Adafruit_NeoPixel.h#L52-L89

We would have to do it a bit differently though, since we skewed away from the 400kHz vs 800kHz speed settings and opted for direct pixel type mapping. It would work the same though, like

// IMPORTANT: Set pixel COUNT, PIN and TYPE
#define PIXEL_COUNT 10
#define PIXEL_PIN D2
#define PIXEL_TYPE WS2812B
#define PIXEL_COLOR NEO_GRBW

// Parameter 1 = number of pixels in strip
//               note: for some stripes like those with the TM1829, you
//                     need to count the number of segments, i.e. the
//                     number of controllers in your stripe, not the number
//                     of individual LEDs!
// Parameter 2 = pin number (most are valid)
//               note: if not specified, D2 is selected for you.
// Parameter 3 = pixel type [ WS2812, WS2812B, WS2812B2, WS2811,
//                             TM1803, TM1829, SK6812RGBW ]
//               note: if not specified, WS2812B is selected for you.
//               note: RGB order is automatically applied to WS2811,
//                     WS2812/WS2812B/WS2812B2/TM1803 is GRB order.
//
// 800 KHz bitstream 800 KHz bitstream (most NeoPixel products
//               WS2812 (6-pin part)/WS2812B (4-pin part)/SK6812RGBW (RGB+W) )
//
// 400 KHz bitstream (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//                   (Radio Shack Tri-Color LED Strip - TM1803 driver
//                    NOTE: RS Tri-Color LED's are grouped in sets of 3)

Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_COLOR + PIXEL_TYPE);

from particle-neopixel.

edalquist avatar edalquist commented on June 26, 2024

So I checked with a friend that is using the same strips and they are GRB pixels. This issue can be closed and I'll poke around to see if I can make those changes work (and send a pull request if I do).

from particle-neopixel.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.