loading

Programming Adafruit NEOPIXELS?

I would like to know where I can find commands for the Neopixels sold by Adafruit.  More specifically command to just turn the pixels on solid.... no blinking, no chase, etc.... just on solid with the ability to tweak the color via the program (or analog pots, one for each color would be great too).?

sort by: active | newest | oldest

There are loads of libraries for these things. Basically all you do is stuff RGB bytes into a big array, then the library clocks the data out for you, so, for example, for three led strip (RGB,RGB,RGB), you'd write (0xFF,0,0,0xFF,0,0,0xFF,0,0) to the LEDs to get solid red.

Cactopus1 year ago

I want to find out how to do this too. I've read through the whole neopixel Uberguide, and very closely studied the library examples for neopixels, but I can't find the one thing that will make it all make sense to a person that hasn't done Arduino before: a reference for the definitions of the terms used in the library! I mean how are we supposed to just intuitively know what all these commands do:

void colorWipe(uint32_t c, uint8_t wait) {

for(uint16_t i=0; i<strip.numPixels(); i++) {

strip.setPixelColor(i, c);

strip.show();

delay(wait);

so strip.setPixelColor(i, c); is probably "this pixel this color"

There is no glossary of what exactly all these arguments do. There are very short comments in the code about them, but that is insufficient for most people that are new to Arduino, I would imagine. The comments in the code is written for people that have already been programming Arduino code for several years and is fluent in how it all works.

I'm totally with you! It assumes too much prior programming knowledge for a beginner, and the comments are not detailed enough. I've been slowly piecing it all together by googling each term. What a pain.

JM19993 years ago

Have you tried contacting Adafruit?

kjsrocks JM19992 years ago

yes and they recomened to use more expensive things than what is needed

JM1999 kjsrocks2 years ago

Yeah, I guess they want to sell their stuff so they would want you to buy the more expensive piece of equipment.

Looks like you have it figured out though so have fun!

Jayefuu3 years ago

Did you not read the tutorial? The Adafruit website is the best resource for reading about their products, they've got many in depth guides on how to use Neopixels.

https://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library

I know they look great on a UHT.

Nice! I bought a strip to play with too. Need to find a suitable power supply for the whole lot though.

Just commissioned a new one with the display and hermetically sealed door - its running on pure carbon monoxide inside this one.

here is a list of everything you need to get started

NEOPIXEL Strip

controller i use gema for testing

power supply

i am using some big industial psu's for a project that i am doing i am putting tons of neopixels in crown molding in our den look forward for an instruckable soon!

Antikythera2 years ago

It's in the Strand test example.

void setup() {

pinMode(0, OUTPUT); // pin0 to + of led (- to ground)

digitalWrite(0,HIGH);

strip.begin();

strip.show(); // Initialize all pixels to 'off'

}

void loop() {

// Some example procedures showing how to display to the pixels:

colorWipe(strip.Color(255, 0, 0), 50); // Red

colorWipe(strip.Color(0, 255, 0), 50); // Green

colorWipe(strip.Color(0, 0, 255), 50); // Blue

it has been a few months but maybe this will help anyone with a similar question.

void colorWipe(uint32_t c, uint8_t wait) {

for(uint16_t i=0; i<strip.numPixels(); i++) {

strip.setPixelColor(i, c);

strip.show();

delay(wait);

so strip.setPixelColor(i, c); is probably "this pixel this color"