Fadecandy and WebSocket

Hello forums,

I want to control the Fadecandy controller with Touch. I hear WebSocket could be the answer. I think i understand the core principle of it. I should send a correctly formatted message, on local host, on the right port. Inside this message should be a matrix of values (RGB, intensity) for my leds. Here’s some info about the websocket in Fadecandy:
github.com/scanlime/fadecandy/b … bsocket.md

I haven’t worked with tables yet on Touch so there’s that :smiley: I dont have a specific question yet but i’m sure i’ll come up with a few along the way!

Marko, Finland

Im getting a weird SSL error trying to get to github, but it sounds like you’ve got the basics.

You can either use DATs or even just CHOPs. DMX lighting is nice to control with sliders, so if you made a few Slider COMPs, hooked up their outputs to a Merge CHOP, then to a Math CHOP that would scale them from 0-1 to 0-255, you could setup a CHOP Execute DAT to that and write small Python script that sends the values everytime a value changes.

If you need help with that, let me know and I’ll get an example up.

Thank Elburz for the tips! I’d love to see that script example. We now have the hardware working. We tested the Processing examples and everything is ok on the hardware side.

I have a small network in Touch, sampling color values from a TOP, with a ‘TOP to CHOP’ -object if i remember correctly. I now need to figure out how to move that “table” of data into the websocket. I guess with a small script inside the websocket script object? Luckily one of us knows a bit more about Python (hint: that’s not me :slight_smile:)

Today we tried to send something through the websocket, but succeeded only to get errors in the other end, a raspberry pi which is running our Fadecandy server.

I’m going to do some googlin’ about how to move that table of data (RGB values) into the websocket, and out of touch to Fadecandy. We were also thinking if it would be possible to import a python library, open pixel control, to Touch?

All of this is a bit over my head, but this is not a really complicated system after all. I think we will get it to work in the near future! I thought i would post some info about the progress we are making.

I feel like a total noob. Glad i posted on the beginner’s secion :wink: I want to send an array of numbers out of Touch via Websocket DAT. How do i do that?

We got the system working. We had to modify Fadecandy’s python lib a bit, and didn’t end up using the websocket DAT at all. We’ll upload some patches when i clean them up first. I’m sending video → top 2 chop, chop to dat, and sending that, with a execute DAT if i remember correctly. Will definitely upload patches, if someone needs them. Will upload patches in some point anyway, cheers!

Our repo so far:

github.com/Swaeg/TouchCandy

EDIT: changed the repository. The original repo didn’t have all the files needed.

Hi,

i am very interested in this topic.

I d like to send images from a DAT folder (in touch) over websockets to a raspberry pi + small screen, to show those images (as a live slide show) in realtime.
the place of the setup, just allows something small like a raspberry pi, thats why i d like to have a running pc somewhere with touch and send the data to the setup + screen.

would you have any suggestions?

thanks,
Sirom