0

funhouse NeoPixel strip?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

funhouse NeoPixel strip?

by mattlewis on Thu May 27, 2021 10:26 pm

I have the 30 neopixel strip that came with the magtag adabox and it lights up fine testing with magtag or a pybadge.

I'm trying to light it up on funhouse A0 or A1 with no luck, just using something like:

Code: Select all | TOGGLE FULL SIZE
pixels = neopixel.NeoPixel(board.A1, 30)
pixels.fill((255,0,0))


No complaints from the funhouse but no light.
What am I missing? thanks

mattlewis
 
Posts: 25
Joined: Mon Sep 23, 2019 10:51 am

Re: funhouse NeoPixel strip?

by blnkjns on Fri May 28, 2021 12:06 am

The PyBadge uses a ATSAMD51 M4 chip, trusted and proven with NeoPixels throughout the Adafruit catalog. On the Funhouse, the main chip is an ESP32. The 5 built in RGB leds are no NeoPixels, but Dot Stars, and the documentation says they work using SPI to allow less strict timing.... Which makes me think it is hard to do the strict NeoPixel timing on the ESP. It might not be compatible hardware-wise. You can always use a very simple and tiny board to work as I2C NeoPixel driver: https://www.adafruit.com/product/4600

blnkjns
 
Posts: 663
Joined: Fri Oct 02, 2020 3:33 am

Re: funhouse NeoPixel strip?

by mattlewis on Fri May 28, 2021 8:12 am

Hmmm. The MagTag similarly uses the ESP32-S2, and it's able to light up this NeoPixel strip, but I had only tested that quickly using the example that relied on the led_animation library: https://learn.adafruit.com/circuitpytho ... ights/code

When I look at the led_animation library, its simple Blink usage example doesn't seem to work for me on the MagTag (pin changed to D10): https://github.com/adafruit/Adafruit_Ci ... _Animation

So I'm trying to figure out what in the 1st (more complex) wreath example above is managing to get the strip to work.

mattlewis
 
Posts: 25
Joined: Mon Sep 23, 2019 10:51 am

Re: funhouse NeoPixel strip?

by mattlewis on Fri May 28, 2021 12:56 pm

Simplest case: the few line NeoPixel library usage examples ( https://github.com/adafruit/Adafruit_Ci ... n_NeoPixel ) work for me on my MagTag (30 pixel strip on D10) but same short examples don't work (no errors) with my FunHouse (currently trying A2).

Could it be an analog / digital pin thing? Noting other NeoPixel examples use a numbered "D" pin.

Or does something need to be set for the A2 pin first that's not necessary on other boards?
(e.g. set it to output, not input)
Thanks.

mattlewis
 
Posts: 25
Joined: Mon Sep 23, 2019 10:51 am

Re: funhouse NeoPixel strip?

by mattlewis on Fri May 28, 2021 6:54 pm

Couple more (weird) data points:

Trying out some other different example code, I tried the RGB example from CP Essentials, and it didn't light up (no errors): https://learn.adafruit.com/circuitpytho ... n-neopixel

Then I noticed a mention of the HSV support in the fancyled library, so I dragged that library into the FunHouse lib folder, and all of the sudden the strip lit up! Code.py is still the above essentials color_chase / rainbow cycle example, not using fancyled at all...
What the heck?

I could not reproduce this... after a restart, the strip stopped working. I unplugged the USB cable, and as I'm removing the cable, the strip lights up and is playing the animation for a moment...

Something about the cable? Connector? The power? Tried another cable, tried just using the 2.4A power adapter that came with Adabox 016. No luck. Any thoughts? thanks.

mattlewis
 
Posts: 25
Joined: Mon Sep 23, 2019 10:51 am

Re: funhouse NeoPixel strip?

by adafruit_support_carter on Tue Jun 01, 2021 12:41 pm

That should just work. Just to sanity check - does the strip still work if you go back and try it with the MagTag?

I just ran this on a FunHouse and everything lit up as expected.
Code: Select all | TOGGLE FULL SIZE
Adafruit CircuitPython 6.2.0 on 2021-04-05; Adafruit FunHome with ESP32S2
>>> import board
>>> import neopixel
>>> pixels = neopixel.NeoPixel(board.A1, 30)
>>> pixels.fill(0xADAF00)
>>> pixels.fill((255, 0, 0))
>>>

adafruit_support_carter
 
Posts: 20535
Joined: Tue Nov 29, 2016 2:45 pm

Re: funhouse NeoPixel strip?

by mattlewis on Tue Jun 01, 2021 6:04 pm

Thanks for giving this a try... I typed your sequence in the MagTag REPL and yes it lit up the strip as expected (yellow fill then red).

Tried the same sequence on the FunHouse, but no luck. No errors but no lights.
(I confess I recently did try upgrading it to 6.3 though)

I *did* get TWO neopixels to work with the funhouse using that neokey socket breakout circuit.

I noticed on the FunHouse pinouts page it says, "All three connectors have protection 1K resistors + 3.6V zener diodes so you can drive an LED directly from the output. The maximum current from these connectors is 200mA." Could that be the issue? If there is a limit of 200mA, why did a fill on your strip of 30 work? (given ~20mA per NeoPixel)

mattlewis
 
Posts: 25
Joined: Mon Sep 23, 2019 10:51 am

Re: funhouse NeoPixel strip?

by vecano on Wed Jun 02, 2021 1:40 am

I was having similar issues with the FunHouse. I tried connecting a 30 neopixel strip to each of the A0, A1, and A2 connectors separately and running adafruit_support_carter's code (updating the pin number according to which connector the strip was connected to). I was using CircuitPython 6.2 and had several libraries in the "lib/" directory including neopixel.mpy. I also was not getting any errors when running the code, but the neopixels wouldn't light up.

I then completely emptied the "lib/" directory AND upgraded to CircuitPython 6.3 AND installed the latest version of the neopixel.mpy library by itself in the "lib/" directory. The neopixels finally lit up after that! And all three connectors work! I don't know which of these changes fixed the problem, but I would try to start with an empty "lib/" directory and installing the neopixel library by itself and test things that way first.

vecano
 
Posts: 2
Joined: Sun Jan 16, 2011 8:29 am

Re: funhouse NeoPixel strip?

by adafruit_support_carter on Wed Jun 02, 2021 11:17 am

The 20mA per pixel is a conservative value to use for budgeting power. Actual current draw can vary a lot and depends on color and brightness. But if power is a concern, an easy way to get around that is to just try lighting the first few, or even just the first, pixel:
Code: Select all | TOGGLE FULL SIZE
pixels[0] = 0xADAF00


Can you provide more detail on how you were using and connecting the NeoKey breakout to the FunHouse. What pins were you using? Were you using the same general code to drive it? etc.

adafruit_support_carter
 
Posts: 20535
Joined: Tue Nov 29, 2016 2:45 pm

Re: funhouse NeoPixel strip?

by mattlewis on Wed Jun 02, 2021 3:48 pm

I tried emptying lib, with just neopixel.mpy inside. It's running 6.3.0 rc.0 from 5/25 and the neopixel library file is from a few days after that. No light, no errors... tried just lighting up one pixel instead of fill, no light (but thanks for the suggestion).

I rebuilt the neokey breakout circuit and retested, and it still works fine: I used a JST to 3 pins cable; wired power and ground to both breakouts. Signal into on the first board, then out the first board into the 2nd board (like on the product page: https://www.adafruit.com/product/4978 ) Got red and yellow as expected with:

Code: Select all | TOGGLE FULL SIZE
import board
import neopixel
pixels = neopixel.NeoPixel(board.A0, 2)
pixels[0] = (100, 0, 0)
pixels[1] = 0xADAF00


(Last time I also wired the switches to A1 and A2 and did "random hue when clicked" but this time I didn't bother)

FWIW, power is coming from a MBPro USB-C, seems to work fine for lighting the whole strip when connected to MagTag or an EdgeBadge. Using Mu 1.1.0.beta.4.

mattlewis
 
Posts: 25
Joined: Mon Sep 23, 2019 10:51 am

Re: funhouse NeoPixel strip?

by mattlewis on Wed Jun 02, 2021 4:02 pm

Just also tried the strip with 6.3.0 stable and a new download of the neopixel library, but no light.

mattlewis
 
Posts: 25
Joined: Mon Sep 23, 2019 10:51 am

Re: funhouse NeoPixel strip?

by mattlewis on Wed Jun 02, 2021 4:43 pm

Ok, this is interesting... so while trying to reset the funhouse, I fumbled it on the table so it fell an inch... and after that small impact, the strip lit up... full yellow as asked. BUT parts of it would flicker blue or pink every couple seconds. Huh. I hadn't previously tried dropping it :)

So I turned it off and on with the switch... no light. Then I tapped it on the table again... and it lit up! Same flickering. Tried again.... and now I can't get it to light up. Does that sound like a flakey connection?

...was just wiggling it around for a minute or two seeing if I could see anything, and it just lit up again (flickering badly...)

...wiggled the connecting wires (USB and A1) and accidentally hit the reset button a few times, and the light became stable. Changed the color in the code to magenta and it switched no problem and stayed lit.

I flipped the switch off/on and now no light :( Cable wiggling isn't bringing it back.

Bad board?

mattlewis
 
Posts: 25
Joined: Mon Sep 23, 2019 10:51 am

Re: funhouse NeoPixel strip?

by adafruit_support_carter on Wed Jun 02, 2021 5:57 pm

Is that the same connector on the FunHouse you used to drive the neokey socket breakout?

adafruit_support_carter
 
Posts: 20535
Joined: Tue Nov 29, 2016 2:45 pm

Re: funhouse NeoPixel strip?

by mattlewis on Wed Jun 02, 2021 11:11 pm

Wasn't certain so I just turned it on with the strip still in: the strip lit up!
Turned it off an on again (toggle switch) and strip is now dark :(

Plugged the neokey breakouts into the same A1 that the strip was in: the two neokey breakouts work as expected: can change their color... and they light reliably after on/off switch, reset button, or usb cable out/in.

Switching back to the strip in A1... can't get any light from it now... trying all the things, wiggling wires... Seems pretty random :)

mattlewis
 
Posts: 25
Joined: Mon Sep 23, 2019 10:51 am

Re: funhouse NeoPixel strip?

by mattlewis on Thu Jun 03, 2021 2:50 pm

More data: I have a flexible neon-like strip (96/m) that I'd cut to ~30 neopixels. I'm using a jst to 3 socket wires cable to connect it to the boards. Surprisingly, it's lighting up 100% of the time on the FunHouse (and MagTag) with the board powered from USB from the laptop (thunderbolt 3 900mA?).

(have to change the pixel_order to RGB for correct colors)

If instead I power the FunHouse from a power adapter (the 2.4A that came with the MatrixPortal adabox) this second "neon" strip does not light up either.

Weirder: the first strip (from magtag adabox) works fine with the magtag as I've said. But I've been powering it from my laptop while testing... if I instead power the strip from the power adapter, when the magtag first turns on, the first half of the strip is some random color. If I hit the reset button, the strip goes to the correct full strip color. If I toggle off/on, it goes back to random half lit, hit reset: full strip lights up with correct color. Reproducible.

I'd mentioned above the 200mA limit from the FunHouse output... is there a similar/different limit from the MagTag's D10?

mattlewis
 
Posts: 25
Joined: Mon Sep 23, 2019 10:51 am

Please be positive and constructive with your questions and comments.