Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C/C++ library
#1
I just got my ws2811 strips in the mail today and am chomping at the bits to play with them. Is there a C/C++ library around somewhere? If not, where should I look to find information on accessing and talking to the all pixel'so driver?

Python is not usable in my projects.

Thanks,
-Lin
#2
At the moment, no there is no C/C++ library for interfacing with the AllPixel, just Python currently.
The protocol is insanely simple though and documented here: https://github.com/ManiacalLabs/BiblioPixel/wiki/DriverSerial#protocol
Just note that the length value is two bytes and the *low* byte is first so you may have to flip low and high, depending on your platform.

What platform are you trying to run this on? There's certainly plans for interfaces in other languages, but we just haven't gotten that far yet. Python was chosen as an easy common denominator, but I can certainly see the desire for other languages.

I'm happy to help out writing a C interface, assuming you don't need *all* the fancy features provided by bibliopixel it would be a pretty simple thing, just depends on your platform and therefore how the serial port is accessed. Really easy if linux Smile
#3
That is wicked simple!

So I built a quickie c# class to communicate with the AllPixel. It's a bare bones driver that just makes the serial commands usable in a c# project. Why c#? well, I was looking for a c/c++ lib that I could wrap in a .net lib for use with c#. Because of the simplicity of this thing, I decided to skip the c++ rout all together.

What this class does not do right now is check if a device is currently in use. Otherwise, it seemed to work fine with my ws2811 strip.

Let me know what you think or if I did something silly wrong! Otherwise, enjoy!  Smile


Attached Files
.zip   AllPixelCommunicator.zip (Size: 2.29 KB / Downloads: 27)
#4
Nice work! That looks awesome Smile Glad the protocol was easy to use Smile
I noticed it was referencing unity... is this interfacing with a game? Would love to see what you are doing with it?
If you ever put this up on GitHub or somewhere else, let us know and will link to it in the AllPixel and BiblioPixel doc as an interface option Smile
#5
I'm going to use it to drive LEDs for my pinball projects. Frozen will be the first table to use it
https://www.youtube.com/watch?v=3qEgEZn3b0M
#6
Whoa! That's AWESOME! Smile Super impressive.
Can't wait to see it all lit up Smile We certainly hope the AllPixel helps out! Don't hesitate if you need any more coding help... though looking at your code, it looks like you won't need much Wink
#7
Just saw the new video (automated google search looking for AllPixel) and that looks great! I like your texture mapping method for generating the colors Smile Very cool!

https://www.youtube.com/watch?v=zWAQjv55AZM
#8
Heh, yeah, just got those working last night.

I'm in the process of getting the lamps in the correct spots now... gotta wait for a Digikey delivery for molex connectors 'cause local shops don't carry 3-pin molex  Dodgy


Attached Files Thumbnail(s)
   


Forum Jump:


Users browsing this thread: 1 Guest(s)