These are chat archives for Makuna/NeoPixelBus

Jul 2015
Jul 07 2015 06:33
Hi @Makuna thanks for your review. I have tried to switch to NeoPixelAnimator but I must be missing something obvious. Sketch now compiles but doesn't give the intended result.
Jul 07 2015 08:27

it might be something to do with this....

strip.SetPixelColor(numberOfTheLight - 1, white); // For now we ignore the color (FIXME)
stripAnimator.StartAnimation(numberOfTheLight, transitionTime, animUpdate);

you've got -1 for one, and then the original value for the other for starting the animation so they are not calling the same pixel.

I tried to get your original sketch to work but it just kept crashing and the iPhone app / chroma kept saying the bridge had disconnected. I'm using the 495 branch though so it could be related to that..

it might be worth keeping the whole strip as 'a light' for now to get it working and go through all the LEDs setting the same colour..

in my main loop i have this

static unsigned long update_strip_time = 0;  //  keeps track of pixel refresh rate... limits updates to 33 Hrz.....
if (millis() - update_strip_time > 30) {
    if ( animator->IsAnimating() ) animator->UpdateAnimations(100); 
    update_strip_time = millis();


which is non-blocking, and keeps the pixel update to 30Hz or so.

Jul 07 2015 22:29
@sticilface thanks, you are right about the -1; I was stupid. Now I can switch the pioxels but the animation is not smooth. Tried your main loop but I get base operand of '->' has non-pointer type 'NeoPixelAnimator'.
Jul 07 2015 22:56
yeah sorry i noticed that after. change the -> to .
animator->IsAnimating() should be animator.IsAnimating()
or whatever your animator is called stripAnimator.UpdateAnimations();
I got your hue working... need to work out a few things. I've got a simple function that returns the IP as a string if you want.
String StringIPaddress()
  String LocalIP = "";
  IPAddress myaddr = WiFi.localIP();
  for (int i = 0; i < 4; i++)
  LocalIP += String(myaddr[i]); 
  if (i < 3) LocalIP += ".";
  return LocalIP; 
Jul 07 2015 23:03
@probonopd and the need to hard code in the application code... should be easy to fix... i was using chroma, and it detected the 3 lights, and i could turn them one sometimes, but the the buttons always seemed to say on, and not go to off when off etc. good effort though. quiet a lot needed behind the scenes to get that working.