These are chat archives for Makuna/NeoPixelBus

11th
Mar 2016
Michael Miller
@Makuna
Mar 11 2016 01:17 UTC
is all this code in your loop()?
remember, examples try to show off specific sets of things, not always the best way to organize your code. the FunLoop is a good one though.
the examples of using animations.IsAnimating is just a way of waiting for something to stop, which maybe what you are trying to do, I am unsure.
Michael Miller
@Makuna
Mar 11 2016 01:22 UTC
I think to start this conversation, you need to state what are you attempting to do?
gavspav
@gavspav
Mar 11 2016 15:28 UTC
Hi.Anyone there? I'm trying to get the library working with my ESP01. Am I correct in thinking it uses GPIO2 - the one next to Ground?
The pixels and code work with an Uno so I'm wondering if the output pin on the esp8266 is borked.
So I guess this isn't strictly a library support request.
Michael Miller
@Makuna
Mar 11 2016 15:37 UTC
Did you read the wiki? About the pin restrictions for esp8266. And more Specifically look for the Section on NeoEsp8266Uart800KbpsMethod. There is a comment about esp01.
Did you find the wiki ?
gavspav
@gavspav
Mar 11 2016 16:42 UTC
Nope. oops! I'll go look
Michael Miller
@Makuna
Mar 11 2016 16:50 UTC
I am interested in how to make the wiki more discoverable.
gavspav
@gavspav
Mar 11 2016 16:52 UTC
Hmm I read the wiki but i was using the Uart method anyway (there is a hint in the example) and pin 2. Still no output. To make the wiki more discoverable maybe move the wiki link from the bottom to under the top heading and make it bigger!
When I unplug the power from the esp8266 and plug it in again, the sketch is lost and I have to re upload it! That isn't normal is it?
Michael Miller
@Makuna
Mar 11 2016 16:56 UTC
No its not normal!
How are you testing to make sure nothing is being sent? What 8s your hardware setup.
gavspav
@gavspav
Mar 11 2016 17:43 UTC
I have 6 ws2812 12v pixels. Powering the esp-01 from 3.3v bench power. Grounds tied together. Also serial TTL thingy to upload and monitor serial port. Sketch prints to serial port but no lights! Same wiring works with arduinos uno with your library (changing the options). I've tried a couple of different modules. I get a blue flashing light when sketch is running. If I unplug power and reconnect, it is gone and just get gobbledygook in serial monitor. Have to upload sketch again
Stephen Hall
@stephenmhall
Mar 11 2016 17:48 UTC
Try running with the serial monitor open, if you get error messages from unit after upload and after every restart it has not uploaded properly. I have found if this happens loading a simple blink first sometimes fixes it.
Stephen Hall
@stephenmhall
Mar 11 2016 17:58 UTC

@Makuna yes that is in my loop, and more, I will be using the wemos D1 mini as a light controller receiving serial commands from an RPi. Reading through the wiki eventually got it working. Maybe an example with two or more animations would be handy to show what changes are needed for multi animations. Question: how do you go about adding extra parameters going into the animation controller for example.
adding the pixel number going into the Blend anim. Replacing the 3 below with a variable.
'''
animations.StartAnimation(1, time, BlendSinglePixel);

void BlendSinglePixel(const AnimationParam& param)
{
RgbColor updatedColor = RgbColor::LinearBlend(
animationState[param.index].StartingColor,
animationState[param.index].EndingColor,
param.progress);

strip.SetPixelColor(3, updatedColor);
}
'''

Michael Miller
@Makuna
Mar 11 2016 18:38 UTC
@gavspav is the uno 3.3v? Note that the pixels need a io voltage near their running volts.
gavspav
@gavspav
Mar 11 2016 20:56 UTC
True but I have never had problems running short string s from teensy before. I guess I short use a converter to rule it out. Can I test the gpio output with a multimeter?
Michael Miller
@Makuna
Mar 11 2016 22:11 UTC
Requires either a logic analyzer or a scope. For a quick test, if you happen to a variable power supply, drop the pixel volts to 3.7
The pixels won't work below about 3.7v and the newer ones are getting more sensitive.
gavspav
@gavspav
Mar 11 2016 23:15 UTC
Unfortunately im using 12v pixels. The following article suggests that pin 4 is actually gpio2. I was using pin 2. Certainly something to try tomorrow!
gavspav
@gavspav
Mar 11 2016 23:23 UTC
Oh i cant seem to paste