ws2812b

Hello all,

can you help me, I have 10 leds (ws2812b) , how I can send command in serial monitor, when I write "1r" - first led must be red, "4b" fourth led must be blue?

The 10 LEDs will need 30 bytes of information, which are the 0-255 level of the 3 LEDs in each unit. Your sketch needs to send all 30 bytes out as the LEDs are usually daisychained. (Data goes from Arduino to IN of the first, OUT of first goes to IN of the next ...)

So I would suggest making an array of 30 bytes. When your sketch changes one or more of the bytes, send all 30 out. You can use the Neopixel library at Adafruit.com, or the fastLed.h library from Github. https://github.com/FastLED/FastLED Do some reading. I've only done very simple stuff like having 4 strips of 40 LEDs and changing the whole strip to the same color (off, white, red, yellow) in response to button pushes.

I need to write code for 5 leds if its simplier. I need when I write ‘‘1r’’ with keyboard on search or whereever, then first led be red, and when I write ‘‘2b’’ to second be blue…and all combinations for 5leds and three colors.

can anyone write me,that simple code?

dejoblbl: I need to write code for 5 LEDs if its simpler.

It's not! :astonished:

Have you actually set up and used any of the "NeoPixel" demonstration programs?