strip.setBrightness(X);
Where 'X' is between 0 (off) and 255 (maximum brightness), e.g. strip.setBrightness(64) is about 1/4 brightness (technically 1/4 duty cycle, which appears more than 1/4 brightness due to gamma correction, but that's a huge explanation for another day...basically, experiment with numbers until you get the result you want).
This was intended for use in setup() for defining the strip brightness throughout the lifetime of the sketch. Some folks use it as an animation effect in itself, which I really don't recommend (another lengthy explanation, but basically has to do with changing brightness mid-sketch being 'lossy' as it's currently written).
Great discussion and nice to see people helping each other.
I am very new to this. Opened my starter kit today ! Found sample code to make LEDs turn on and off in response to a pushbutton, then my 8 LED RBGW pixel stick. But I can't find a demo code for my 12 and 24 neo pixel rings. I just want to get them running, and then follow the code to learn the syntax. There are so many smart people out there. Blows me away. I tried looking in LEARN on adafruit's website, but did not find what I was looking for. Anxious to light these items. Thanks.
Oh. Just realized. I'm stuck with this error, too.
Arduino: 1.8.1 (Mac OS X), Board: "Arduino/Genuino Uno"
Ron_s_24_LED_Ring:19: error: 'strip' does not name a type
strip.setPixelColor(0, 0, 0, 0, 127);
^
Ron_s_24_LED_Ring:21: error: 'strip' does not name a type
strip.show();
^
exit status 1
'strip' does not name a type
It seems to not be happy with strip.show(); , which I understood to be what starts pushing data out. No idea what do do. Thanks.
Hi fellow Arduino BANNED. I found the problem. Earlier up in the code, I had some instructions in the wrong order, either side of set up. Now it compiles, but, no LEDs do anything. Not sure. I've seen online demos of LEDs making circles, changing colours, and so on. That's all I'm looking for for now - just to get something happening. Thanks if you can share a link or code.
As much as I was wanting to keep it MINE, hey, life is for sharing.....
If you want to make a nice little LED strip Morse Code display system.......
The circuit:
The first resistor is to allow enough current to light the LED without being too much.
The second one - between the bridge rectifier and opto-isolator is calculated from the input voltage.
The little square with the two black lines in it are pins. You put a strap on them or take it off.
This is to control if the input is "normally open" or "normally closed".
AFAIK, the code works.
(Rename the .ino.txt file to just .ino)
Just have a look at the code and find the pins to use for the INPUT, MODE and NeoPixelOUTPUT pins.
Also adjust the delay_time value and the value for now many NeoPixel LEDs you have.
Ronfinlay wrote:Hi fellow Arduino BANNED. I found the problem. Earlier up in the code, I had some instructions in the wrong order, either side of set up. Now it compiles, but, no LEDs do anything. Not sure. I've seen online demos of LEDs making circles, changing colours, and so on. That's all I'm looking for for now - just to get something happening. Thanks if you can share a link or code.
Have you tried the strandtest example that comes with the neopixel library?
To get your own code running, please post it so we can have a look.
Thanks. I really appreciate your efforts, all of you out there in Arduinoland.
I got it working, sort of, in that the LEDs do come on and run a series of display patterns.
Here's what I have purchased from Adafruit (What great products and service too.) : Uno, 8 RGBW Strip, 12 RGBW ring and 24 RGBW ring and a whole bunch more stuff !!! Very exciting. This is my first entry into programming anything. A bit nervous, but, seems worth the time to learn.
I've learned the "Wait" ties up the processor so only one of my LED sets can run at one time. The other 2 get stuck if I upload a different program. I assume concatenating all 3 programs will still run them in sequence, so the same problem will arise. I read that "mills" is the way to go, as I want to connect my 8 RGBW Strip, 12 RGBW ring and 24 RGBW ring, and have them work in sync, such as respond to a push button input to select all red, all green.... 7 colours, then wipe in 7 colours plus a 7 colour chase sequence, then theater in 7 colours and a 7 colour chase sequence, so each push of the button advances to the next presentation option.
For example, if I take the strand test for 8 pixel stick, and change to and save as 12 ring, then 24 ring, and change the number of pixels from 8 to 12, to 24, the LEDs behave differently. I assumed a wipe from one end to the other (off to red), one LED at a time would produce the same look, for each form factor. It didn't, and I don't see where the code would cause this. It's odd things like this that confuse me, so I'm looking into a page about the syntax to understand each function. Slow, for sure !
Also, I have a 16 x 2 LCD to display other switch input counts, plus I'd love it to display the colour presentation mode, not that that won't be obvious soon enough.
I also need to control a 5 V relay based on an input from a switch, with a DIP switch settable delay time. I am sure Arduino UNO can do this.
I'd love to post my code, but don't see where to provide that, as I'm sure that will help you help me better. I won't post it here, because I know that's against the rules.
Guidance or a link to code on any of these items would be greatly appreciated.