These are chat archives for Makuna/NeoPixelBus

23rd
Apr 2016
TheAustrian
@TheAustrian
Apr 23 2016 13:23
@Makuna Thanks a lot, I got the library to work first try on my Wemos D1 Mini board on the RX pin! I just have a question: I found the .Darken method, but it basically is pixel-based - is there a way to fade out the whole strip slowly without iterating over every pixel?
marksev1
@marksev1
Apr 23 2016 13:24
I have same wemos d1 mini boards :)
TheAustrian
@TheAustrian
Apr 23 2016 13:25
They are really comfy boards - cheap & small.
marksev1
@marksev1
Apr 23 2016 13:29
Indeed
sticilface
@sticilface
Apr 23 2016 16:30
@makuna... I just received some PCBs I made for my WS2812 project... bit of an epic due to an incomplete ground connection.. but got the ESP working just fine. WS2812s... though.. not working... to cut a long story short i've ended up using some newly purchased ESP12Es.. and I believe (although I've not tested) that the blue LED on board is connected to GPIO2.. so the UART method doesn't work. DMA does though... 1) Have you come across this.. 2) if so, might worth adding to the WIKI. I need to remove the LED and see if it is the case... but I placed a jumper on the board to select between DMA and UART methods... luckily...
Michael Miller
@Makuna
Apr 23 2016 18:04
@TheAustrian I do not expose a darken all, as all it would do is iterate over every pixel, gets its color, and call darken, and then set the color back; just like you would do. Further, what you really want is to animate it dimming usually, and the best way to do that is remember the original color, calculate the target color, use an animation, lerp between the original and target, and here is the trick, often you will want to then apply the gamma correction to this calculated value. Apply gamma to an iterate approach of read the last, dim, and set does not work correctly.
Michael Miller
@Makuna
Apr 23 2016 18:10
@sticilface NodeMCU boards also come with a blue LED attached there (will need to confirm) and they don't have an issue. Do you have a resistor inline between the pin and the NeoPixels? If not try one, or try removing it. The pins on Esp8266 in respect to pull up or pull down resistors is inconsistent, so sometimes this extra is needed, sometimes not.
@sticilface I will add some comments in the Wiki about confirming how the pin is wired already.
TheAustrian
@TheAustrian
Apr 23 2016 18:23
@Makuna Thanks for the explanation! Since I used another library before, I wanted to change as little of my code as possible, but you are right, I should use animations.
sticilface
@sticilface
Apr 23 2016 18:27
I'll try removing it. I've just had no issues before using raw esps. Both 01 and 12...then got these new 12E. And for all intents it should have worked. I thought I had made a mistake with the pcb. But I had made a jumper between gpio2 and 3, and that works fine. I can see gpio pulses, but they go wierd when connected via my level shifter. Anyway. I'll try removing the led see what happens.
Michael Miller
@Makuna
Apr 23 2016 21:45
@3DSasha Just plublished a new version that includes a bitmap file image object that handles the reading and rendering for you. Thanks for the idea on this.
3DSasha
@3DSasha
Apr 23 2016 22:33
@Makuna omg, i reading about it right now. You realized my project before me :-) My experiments with esp are frozen due to my basic work taking all time. But I made some changes into my esp-to-led device. I wrote subroutines to read TGA files in addition to BMP. I think, TGA format is more comfortable than BMP. There are RLE compression (for some effects it saves huge time to read from SD), some colormap modes (saves time maybe) and additional fields to save some information in file like "long start_fx_loop_offset, end_fx_loop_offset" in file, other info about effect like relaxing speed or strobe speed (this is for future mode/scenario select feature) and etc.
3DSasha
@3DSasha
Apr 23 2016 22:44
@Makuna But for simple purposes BMP is good too. Here is TGA reader/writer https://github.com/npedotnet which I adopted to my device
3DSasha
@3DSasha
Apr 23 2016 23:19
@Makuna One more idea with your bitmap object maybe useful to variety of linear strip users is to set SCALE parameter in 'image.Blt(strip, 0, 0, animState, image.Width());' for example. Idea is provide fit-to-fill or caleido-to-fill feature: line bitmap effect with X size to ledstrip with PixelCount size if you understand
3DSasha
@3DSasha
Apr 23 2016 23:24
With that feature bitmap effects will be more universal for different length strip users. (Next step is online effects library :-))