is this on a Bela or BelaMini? It is really hard to drive those from Bela unless you forego analog in/out or do some custom firmware stuff, but from BelaMini it should be no problem. We can write a program that receives OSC (from Pd in your case) and drives NeoPixel.

And do you need the analog ins or analog outs while running this? Also the audio inputs?

I don‘t need the audio inputs and I don‘t need the analog output. I am using two sensors, a joystick (I think two analog ins and a digital in) and a distance sensor (I2C).

OK I think we can sacrifice the audio input in order to get an SPI output that can be used to drive the neopixel, need to check some stuff. I'll get back to you.

Here's an example of a program that can run stand-alone on Bela, receive OSC and set LEDs on a Neopixel-like strip. It comes with a Pd example of a 16-segment VU-meter.

https://github.com/giuliomoro/O2L

Note that you should either run this Pd example on your host or, if you run it on Bela, rename the file to _main.pd and put it in a different project.

The mods you'll need on your Bela cape involve bending out pin P9.30 (which is normally the data line coming from the codec's ADC). This is a potentially destructive operation if not done carefully: it may be complicated to bend the pin back in place if you need the audio input again in the future. If possible, try bending it out without causing a sharp angle, e.g.: using a pair of pliers to shape it into a more rounded shape. If this pins should break now or in the future, you can probably bypass it with a jumper wire soldered to the back of the beaglebone ... not ideal but better than nothing.

You'll also need to install a modified device tree overlay on your board. All of this is explained in some more detail at the top of the main.cpp file.

You can test O2L (and all the above mods) by running a Pd patch such as the enclosed one on your host, while running this program on the board from the IDE. Once that setup is tested and works fine, in order to run a regular Bela program for audio/sensor processing alongside O2L, you will need to run the O2L program as a service on the board. See here for details on that.

Thanks for the information, I will try this today. Is P9.30 located two below P9.26 (I2C1 SDA) as shown in the IDE Pin Diagram?

Once you start using this we can see whether there are functionalities that are best implemented in the backend rather than have you determine the color of each pixels from Pd, via some higher-level interface. For instance, it could be made easier to fill a set of pixels with a solid color, or to say which 5 pixels should be on.

Knallberto // - get the latest from https://github.com/BelaPlatform/bb.org-overlays into /opt/bb.org-overlays"

That's an interesting one. Through the IDE you could do the following:

  • download this file to your computer https://github.com/BelaPlatform/bb.org-overlays/raw/master/src/arm/BB-BELA-00A1.dts
  • drag it on an open project in the IDE
  • in the console at the bottom of the IDE run, replacing PROJECTNAME with the name of your project:
    mv /root/Bela/projects/PROJECTNAME/BB-BELA-00A1.dts /opt/bb.org-overlays/src/arm
  • then in that same console run:
    make -C /opt/bb.org-overlays/ all install && echo DONE
  • once that's done, reboot with your fingers crossed

Thanks, after doing this I get an error message: "Error opening file BB-BELA-00A1.dts: file does not exist." (after the reboot). Is this of any importance? I uploaded the O2L example anyway and it works fine with running PD on my laptop (the neopixel are reacting to the mic input)

    Knallberto file does not exist." (after the reboot). Is this of any importance

    Not a problem.

    Knallberto and it works fine with running PD on my laptop (the neopixel are reacting to the mic input)

    Brilliant

    Okay, it is working perfectly! Thanks for your help!

    2 months later

    Hi,
    Can I use the above description to get neopixel(like) LEDs running on a Bela even though I use a multiplexer? Audio channels not needed, same as above...

    3 months later

    Hi, I am trying to control neopixel strip from Bela mini and having issues. I am running O2L C++ on Belamini and sending OSC message from PD on desktop.
    The symptoms are:
    - just sending "g" led color with intensity 120 for first 8 led turns all the led in white/red/blue (and other funny colors, but the changing sequence matches with when I change the control message) when powered with 5V and signal from P2.25.
    - When powered with 3.3V and signal from P2.25, it does not do anything.
    I also tried external transistor to reverse the signal voltage, it somehow turns the first led to green and nothing else happens.
    I have also tried changing "kSpiLeadingZerosNs" inside the AddressableLeds.h but no luck.
    Any suggestions?