DotStar SPI class for Processing for Pi

Hi folks,

I made a class to control DotStar LEDs over SPI with Processing for Pi. I don’t have the proper chops to make an actual Java library, so I just put together some sample code. With it you can control an LED strip with the raspberry pi hardware SPI and set individual LED colors or fill the whole strip with one color. I hope it’s useful to others. You can find the sample code on github.

1 Like

Hi @bluemoon – thank you so much for sharing this work!

We could help you package your DotStar class as a library and release it from your repo – however you would need to be able to maintain it as a library once it was so-packaged. This would mean using Eclipse or NetBeans to edit it as Java once it was set up and built. Does that sound like something you would want to do?

Hey Jeremy, Thanks so much for the assistance offer, but unfortunately this is just what I don’t know how to do - use ecyplse or netbeans.

@bluemoon One little tip to get you started is to convert the processing code to java. The processing pre-processor does this for you, but most people don’t know that when you run the sketch the java code is stored in your /tmp directory. If you look at the /tmp directory you will find two folders RPI_DotStar_SPI... one contains the java class but the other pre-compiled java file.

1 Like