These are chat archives for Makuna/NeoPixelBus

16th
Sep 2016
Mehrdad K
@mkeyno
Sep 16 2016 16:04
hi Michael , I review your raster image wiki again and get little more sense about that , however I believe this feature maybe more useful for professional job like POV and Screen display but it is so complex for apply for normal effect in LED strips ,
I was wondering why don't have methods to create the mix of color effect which is ordinary available in other lib
it is hard to have single spirit of colors use raster image features & method
Mehrdad K
@mkeyno
Sep 16 2016 16:11
as say before I simply use the Palette feature to mix, up to 16 difference colors together and apply it on my strip , but I think you left this feature and instead provide complex raster image feature
have you ever evaluate other LED lib before?
Michael Miller
@Makuna
Sep 16 2016 17:56
I didn't write this library filled with effects (like what you want) I wrote this to be building blocks that are thin and flexible (small code, small memory, and thus fast). I don't agree with many design decisions that FastLed author went with so of course I didn't follow his patterns.
I am sorry your current skills don't allow you to see how to use them to get what you want done; but I can only lead the horse to water, I can't make it drink.
You keep trying to create your effect one way, rather than describe what you want and then seek a way to do it; further you keep describing how FastLed does it rather than think of other ways to do it. It just seems that you want FastLed rather than want to create your effects.
Mehrdad K
@mkeyno
Sep 16 2016 18:14
no Michael , I'm just user intend to get through your lib and as a LED fan just compare what you offer against other library and I really interesting to get more profesional in you lib , caz I sense its ability and hope you could guide to learn it ,
any way I might add my rainbow sketch with following code work well
NeoPixelBus<DotStarBgrFeature, DotStarMethod> strip(NUM_LEDS,14,13);
Mehrdad K
@mkeyno
Sep 16 2016 20:06
Michael I have another question , I have byte array for RGB data , which fastest way I can put them in LED strip
sticilface
@sticilface
Sep 16 2016 20:09
you can copy them directly to the buffer. set a dirty flag. and call show
Mehrdad K
@mkeyno
Sep 16 2016 20:38
thanks @sticilface , like this ? memcpy(Pixels,LED_BUFFER,NUM_LEDS*3);
sticilface
@sticilface
Sep 16 2016 20:40
Yeah memcpy will work. I iterate using a for loop. But it's just a pointer to unit8
Except. Replace Pixels with strip.Pixels()
Mehrdad K
@mkeyno
Sep 16 2016 20:42
thanks buddy , memcpy(strip.Pixels(),LED_BUFFER,NUM_LEDS*3);
sticilface
@sticilface
Sep 16 2016 20:42
and make sure ur buffer from is always big enough. I.e. Created with NUM_LEDS*3
Otherwise memcpy will overrun!
= crash
And the dest is big enough too
Mehrdad K
@mkeyno
Sep 16 2016 20:44
LED_BUFFER = (uint8_t *)malloc(3*NUM_LEDS);
I've just review your profile ,noticed you are used Michael lib in your sketch
have you read our discussion about NeoPixelBus lib
sticilface
@sticilface
Sep 16 2016 20:52
U mean neo Pixels lib?
Mehrdad K
@mkeyno
Sep 16 2016 20:53
yes
sticilface
@sticilface
Sep 16 2016 20:55
yes used it lots! from the beginning
not used the new features yes..
sprits and bitmaps and stuff
Mehrdad K
@mkeyno
Sep 16 2016 20:57
yes, making the normal effects for strip is not easy
I just compare it with other lib and also I know still novice in Micheal repo
sticilface
@sticilface
Sep 16 2016 21:01
its pretty powerful once u figure it out! :)
Michael Miller
@Makuna
Sep 16 2016 21:30

Yes you can just memcpy(), but be careful that the bits are in the same order as the feature for your NeoPixelBus. Where do the bits come from? This is where the NeoBuffer work helps as it abstracts those details if the data comes from PROGMEM arrays or even a file. You should note, that

const uint8_t MyPixelData[3*144]= {0xff, ... };

will take up RAM, which is not good. This is what PROGMEM is for.