LEDscape and adafruit NEOpixel LEDs on BBB

Hi Beagle’ers:
I have a string adafruit NEOpixel LEDs[1] that I want to drive with the BBB. LEDscape[2] looks like a good way to drive the LEDs via the PRUs.

I’m not sure how to get started. Has anyone used this software to drive the LEDs? What should I wire where?

–Mark

[1] http://www.adafruit.com/products/1376
[2] GitHub - osresearch/LEDscape: Beagle Bone Black cape and firmware for driving a large number of WS281x LED strips.

http://lmgtfy.com/?q=beaglebone+black+ws2812

Plenty of tutorials . . . adapt to whatever pin(s) you wish to use on our BBB

-david

David:
Thanks for the pointer, however I had already Google’d around and picked the LEDscape as the most promising. Since I haven’t uncovered any ‘getting started’ guides for it I guess I’ll just dive in a figure it out for myself.

–Mark

I’m looking into the same thing and running into the same problems of no simple tutorials. At this point I’m having issues getting the PRU to even be enabled, and I’m not really sure why.

I’m an idiot. I blindly followed instructions that were likely for Angstrom, and put the dtb file in the wrong place, /boot instead of /boot/uboot/dtbs. Now that the dtb file is being read I’ve got everything showing up properly, which is great because I’ve got my first NeoPixel stick arriving in the mail today. Unfortunately I’ll be out of town this weekend, but I’ve got a 4 hour train ride back Monday morning so I may try to get some stuff working on the train.

Ian:
What instructions were you following?

–Mark

I’ve been using a LEDscape fork that I think will better allow me to use Python to write the bulk of my program, and then LEDscape to do the Neopixel control.

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

Everything works, except that you should check the uEnv.txt file in /boot or possible /boot/uboot to make sure you’ve put the *.dtb file in the correct place to be read. Different distros do different things, so it’s hard to say exactly what you’re looking for here.

Unfortunately, USPS is late, so I won’t have my Neopixel Stick before I leave this evening, so I won’t be putting any time into this over the weekend, but I do expect to pick this back up early next week.

-Ian

Sorry, one minor correction.

The dtb file should be in one of the following places:

/boot
/boot/uboot/dtbs

If you’re using the latest Debian image then it’s the second. I believe Angstrom uses the first. It looks like the Yona-Appletree LEDscape readme has been just been updated to reflect this.

-Ian

Good news, one NeoPixel stick works :). Following the basic instructions found on Yono’s LEDscape repository, combined with a 74HCT245N and I’ve got flashing NeoPixels run off my BBB. The important part is making sure to connect the 74HCT245 correctly, otherwise nothing will happen. Make sure that the BBB is on the Ax side and the NeoPixels are on the Bx side, and make sure DIR is +5V and /OE is 0V. Everything should just work after that.

You may have luck with a different level shifter, but the 74HCT245 seems to be highly recommended by a bunch of people, so I went with that.

My next step is going to be trying to implement some Python code to do the logic in my program, and use Yono’s LEDscape code just to drive the NeoPixels.

Wow, that was really easy to make work. I didn’t even use the 74HCT245. I hooked GND to ground and the +5 to the 3V3 on the bone. I attached the DI to P9_22 and it just worked!

If I understand the code right, the data signal appears on several GPIO pins as reported by pinmap.js. However I find it works on some, but not on others. Have you seen this?

Thanks for the pointer to the github site. The instructions made it really easy to get going. Now I need to do something interesting with it.

–Mark

Yeah, the 3.3V trick works ok for small numbers of LEDs, but if you’ve got a long strip you’ll have voltage drop and the colors will look funny, probably brown/red, as the blue won’t have quite enough voltage to work properly.

I believe the code can broadcast all pins or just one at a time. I haven’t dug into this yet though. I’ve been trying to get the opc-rx server working, but I’ve had some issues. I’ve also noticed the rgb-test program occasionally glitches, so I think I might have some interference on my lines.