Is there support for Neopixel?

Hello! I am fairly new to beaglebone and all the things that can be done with it.

I recently purchased a neopixel ring light and I was wondering if there were any useful, up-to-date guides on how to drive it from the beaglebone black. I was able to use it easily with arduino, but I have not found a guide on how to use it with beaglebone black, and all the guides that had anything close to it seem to be very much out of date. (Believe me, I have tried following nearly every one that I could find and they do not work at all.)

If there is someone who knows anything about this, I would very much appreciate it :slight_smile:

At a guess from the timing requirements you would probably need to program a PRU to do the shifting.
I doubt you would manage it by bitbanging a GPIO line as it is probably done in an Arduino.

After a quick google I found this

https://github.com/charberg/LED_practice

But that hasn’t been updated for many years. You might be able to find others though

Aslo this

https://github.com/Yona-Appletree/LEDscape

Given the age of both of these they will probably require some modifications to make them work.

Hi @benedict.hewson

I recommend the excellent PRU Cookbook.
https://markayoder.github.io/PRUCookbook/05blocks/blocks.html#blocks_ws2812

Falcon Player ( https://falconchristmas.github.io/ ) supports the various ws281x LED’s (aka: neopixels). On the beagle, it can drive 48 strings (via the PRU’s) directly from the GPIO’s (level shifter recommended). There is also a newer way to drive 128 strings with shift registers.

Caveat: I sell capes for the Beagle specifically designed to do this: https://kulplights.com/

Hi I am working in the Neo Pixel strips with Beagle Play Board.
Which Library I have to use for that.

Regards
Manan

the protocol for Neopixel is much simpler than what I did with SPI here: Turnkey PRU deskclock application for BBB

I could easily swap out the SPI code for WS2821 and create a new image. But for whom would this be done? I’ve had but one reported successful follow through for the desktop clock.

Is it (still) too complex for those on this board? would anyone bother to download the image to a uSD card and run it?

Is there worry that there is malicious code in the image? At least with the neopixel, no network access would be necessary (NTP necessary for desk clock)… @FredEckert ran it for 47 days before reporting success, perhaps he had a wireshark instance watching it for calls home … (there aren’t any)

I don’t know how to package software for the BBB more easily than to wrap it in an image, but I don’t see others doing it (aside for @RobertCNelson of course) … is this the issue?

regardless, it would be necessary to use a level shifter with these LED devices, they need 5v logic as well as 5v led power… wouldn’t this make a project with Neopixel too complex? At minimum, you’d need a breadboard for the level shifter, and you’d need to know HOW to operate a level shifter.

For the turnkey code I’m thinking about simply assuming a 24 led device (should also work for fewer led), and randomly assigning values to the 72 ‘slots’. This would verify that the device is working properly, assuming that the headers are wired properly, and the level shifter is wired properly.

A more interactive script could easily be provided that would use keystrokes to select led device and color. It would ignore all but ‘rRgGbB0123456789’. Numbers would indicate which led, ‘r’ would decrease red value, ‘R’ would increase red value … etc. This script should be all any aspiring programmer would need to begin modifying to taste… Of course it would be Perl, but ANY language that can produce text would work.

I often think of a cute story where gomer was asked for both cigarette and light, and responded ‘how are you fixed for suction?’

gomer

try this: it is a self contained image file suitable for burning to uSD card