Author Topic: NeoPixel Library Not Working with Arduino 1.6.8  (Read 1626 times)

aeolus

  • RFduino Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
NeoPixel Library Not Working with Arduino 1.6.8
« on: April 08, 2016, 08:44:17 PM »
Hi all, I'm new here. I tried to do my homework. I have tried all the modifications made by Tolson, and cannot get my NeoPixel Strip (WS2812Bs) to give me anything but full bright white. Any ideas? Am I missing something? I can get this (https://gist.github.com/SamDecrock/80e30c9bae734858d50d) , but would like to use the library if possible. Anyone know why the wipe will work for me in this code, but the library won't? What changed between 1.5.x and 1.6.8 that is so different?

Also, what Programmer should I be using? Am using AVRISP mkll now...

tolson

  • Global Moderator
  • *****
  • Posts: 812
  • Karma: +19/-0
    • View Profile
    • Thomas Olson Consulting
Re: NeoPixel Library Not Working with Arduino 1.6.8
« Reply #1 on: April 09, 2016, 10:57:13 AM »
Hi Aeolus,
Hi all, I'm new here. I tried to do my homework. I have tried all the modifications made by Tolson, and cannot get my NeoPixel Strip (WS2812Bs) to give me anything but full bright white. Any ideas? Am I missing something? I can get this (https://gist.github.com/SamDecrock/80e30c9bae734858d50d) , but would like to use the library if possible. Anyone know why the wipe will work for me in this code, but the library won't? What changed between 1.5.x and 1.6.8 that is so different?

Have you read the rather long thread on the topic. http://forum.rfduino.com/index.php?topic=30.msg3181#msg3181
My modified Adafruit neopixel library hasn't worked since it was broken by the IDE changing the compiler.  There really is no need, IMHO,  for complicated all encompassing pixel libraries to drive a neopixel string. There is a simple example of the subroutine needed in the thread on the subject. http://forum.rfduino.com/index.php?topic=30.msg2526#msg2526

It is the one that Sam Decrock refers to. It has been verified to still work on every version of Arduino IDE since 1.5.7 including 1.6.8. It is verified working for Simblee as well as RFduino.

Quote
Also, what Programmer should I be using? Am using AVRISP mkll now...
AVRISP is not used to program RFduino or Simblee. How are you able to program the RFduino or Simblee now?
« Last Edit: April 09, 2016, 11:01:40 AM by tolson »

aeolus

  • RFduino Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: NeoPixel Library Not Working with Arduino 1.6.8
« Reply #2 on: April 12, 2016, 10:34:40 AM »
Thanks for the reply!

Quote
Have you read the rather long thread on the topic. http://forum.rfduino.com/index.php?topic=30.msg3181#msg3181
I have read the above thread, a few times now. It is long, so I still am not sure I caught everything.

The subroutines of Sam Decrock do work for me. I can control the LEDs with a preset routine. I also have had success with the FastLED library at http://fastled.io/, though it is unnecessary.

However, I'd like to send data bout which routine to run via BLE. But, upon BL receiving data, the routine goes awry and the RFduino resets, or colors are thrown off, etc. I am being informed that this is due to not being able to handle interrupts while using the WS2812B's, and thus I will have difficulty sending data while  a pattern is running (which I would ideally like to have a looping LED-routine, which I can change to another looping routine as desired).


Quote
AVRISP is not used to program RFduino or Simblee. How are you able to program the RFduino or Simblee now?
Disregard this... I am not using a "programmer" after all. Rookie misunderstanding. Just ctrl+U.

jos.ph

  • RFduino Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: NeoPixel Library Not Working with Arduino 1.6.8
« Reply #3 on: May 10, 2016, 05:20:49 PM »
Hi All -

Maybe this is useful to some, perhaps not but I took the original example posted by Sam Decrock and added more of the strandtest routines. Proven working with Simblee + Arduino 1.6.5. Note: I've got a 3.3v > 5v logic level shifter (this one works great https://www.adafru.it/1875, although bi-directionality is not necessary)

Gist is here: https://gist.github.com/jmsaavedra/7b7db98bcd43c32c617853ec8e61a3cc

tolson

  • Global Moderator
  • *****
  • Posts: 812
  • Karma: +19/-0
    • View Profile
    • Thomas Olson Consulting
Re: NeoPixel Library Not Working with Arduino 1.6.8
« Reply #4 on: May 10, 2016, 07:44:04 PM »
Hi Jos.ph,
Nice addition!  For the colorWipe(Color(255,255,255),5) I am getting RED instead of WHITE. Are you?



jos.ph

  • RFduino Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: NeoPixel Library Not Working with Arduino 1.6.8
« Reply #5 on: July 26, 2016, 01:19:24 AM »
@tolson - strange! I am not getting that problem.

However, I need this code to be running while BLE is turned on. Obviously, the interrupt situation was a problem -- after removing the disable (`noInterrupts()`) and re-enable of interrupts from the `showStrip()` function, I've been getting very inconsistent but extremely noticeable "tears" when updating the LEDs frequently (~10fps or more).

The glitchy "tears" only happen when I'm updating 60 pixels or more (my circuit has 144 total). I'm moving to FastLED to see if that helps, otherwise I'll be replacing the NeoPixels with Adafruit's DotStar:https://learn.adafruit.com/adafruit-dotstar-leds/overview, which runs on 2-wire SPI (SCK & MOSI). Much faster update speed + less precise timing necessary.