Author Topic: Neopixel Issues  (Read 11307 times)

PeterF

  • Hero Member
  • *****
  • Posts: 883
Re: Neopixel Issues
« Reply #30 on: December 14, 2016, 10:39:11 pm »
Lol... That may be the case... but I'll quickly bow down and utter "All hail kh" or "All hail Erik" as soon as they come by! :-P

Ah... tech support in schools... that never ends well! :-O

Yessie... indeed... this would be perfect in making is a much easier set and forget... on in this case forget as you don't need to set! ;) I'm currently working on a system whereby a GPS is used to get (and periodically update) the time , and used to set a reasonably accurate real-time clock, which can then be polled for the current time by any device in range. I'm intending to use NRF24 modules for the RF link between devices, and have the master and slave units working, just need to lock down what micro-controller I'll be using for the master... the master MCU is currently a STM32 (Maple Mini clone), but it is a bit too power hungry for my liking. I had been using a Teensy 3.0 that I had gotten when Paul did his kickstarter ages ago, but it rather unexpectedly expired after a few days of use. I might even consider using an Oak, and shutting down it's wifi... would give me plenty of memory and processing power, and the Oak power consumption is pretty good when the wifi isn't active... hm....

Anyway, here is the output from the currently running sketch... As you can see it is the loop runtime is extremely consistent!  ;D

crambo

  • Jr. Member
  • **
  • Posts: 52
Re: Neopixel Issues
« Reply #31 on: December 16, 2016, 07:00:22 pm »
Ok, I have been using NeoPixelBus lib in place of Adafruit and it has been running successfully for more than a day. It might be a fluke...and probably is. I a waiting to commit to shutting down interface until I hear back from PeterF (God Member).

PeterF

  • Hero Member
  • *****
  • Posts: 883
Re: Neopixel Issues
« Reply #32 on: December 16, 2016, 08:41:10 pm »
God here ;)

Well, the two blinking Oaks are still happily pulsing away... both the P1 LED blinker and the NeoPixel blinker. So a 1000 ms delay and nothing special done (wifi active, particle active) seems to be fine. The neopixel doing it's rainbow thing seems to be working just fine... this is ... day 2? and it is still trundling along with consistent 5120 ms animations, and around a 5000ms wifi connect delay. So it would seem so far that neopixel with wifi off is just fine also.

btw, i noticed the nexopixelbus library you're using has this note in the github readme - "This is the most functional library for the Esp8266 as it provides solutions for all Esp8266 module types even when WiFi is used." - so it may not be a coincidence. The developer, Michael, appears to have done quite a bit of ESP8266 specific tuning in it, so that probably explains why it is more stable.

Drats... do I need to provision yet another oak now? :-P Well, it needs to be unpacked, updated, and registered to my account some time ;)

crambo

  • Jr. Member
  • **
  • Posts: 52
Re: Neopixel Issues
« Reply #33 on: December 19, 2016, 12:54:11 pm »
I can report EXCELLENT stability with NeoPixelBus library on the Oak. Making the code changes could not have been easier. I have had it successfully running for days now on one clock and in FULL Particle/Wifi whizzbang mode.

Thank you PeterF for all your support on this issue and my various other mild freak outs.

PeterF

  • Hero Member
  • *****
  • Posts: 883
Re: Neopixel Issues
« Reply #34 on: December 19, 2016, 03:50:56 pm »
Hey, no problem... it's good to see the Oaks been put to good use ;)

The oak with neopixel doing the 1 second on/off P1 led blink is still running fine, as is the neopixel. I did notice the P1 LED blinker went a bit stupid and was blinking really slow... like 3 seconds on, three seconds off yesterday for a few minutes, but it seemed to right itself again and resumed normal behaviour. The other Oak with the wifi off until NTP is still running fine, and is happily running it's animation still. So at least that use case should work if anyone else needs it in the future. But it sounds like the NeoPixelBus library is the way to go, and I'll definitely have to give that library a try now.

Irony

  • Newbie
  • *
  • Posts: 7
Re: Neopixel Issues
« Reply #35 on: March 01, 2017, 09:42:20 pm »
Crambo,

Can you share a brief NeoPixelBus code example? I've had the Adafruit library running neopixles on pin 7, but have always run into stability issues (sooner or later is stops).  The NeoPixelBus examples didn't do anything for me (but they did compile and are seemingly running on the Oak because it is responsive but nothing on the lights).

Thanks!

crambo

  • Jr. Member
  • **
  • Posts: 52
Re: Neopixel Issues
« Reply #36 on: March 12, 2017, 02:28:31 pm »
Sure!

Here is the head:

Code: [Select]

#include <TimeLib.h>
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <NeoPixelBus.h>
#include <NeoPixelAnimator.h>

const uint16_t PixelCount = 26; // make sure to set this to the number of pixels in your strip
const uint16_t PixelPin = 3;  // make sure to set this to the correct pin, ignored for Esp8266

NeoPixelBus<NeoGrbFeature, Neo800KbpsMethod> strip(PixelCount, PixelPin);


Here is a sample I used. Remember to convert Serial.print to the Particle.print if you want debug output....

https://github.com/Makuna/NeoPixelBus/blob/master/examples/NeoPixelTest/NeoPixelTest.ino

I use P3 for the signaling. I had issues with other pins.