Sending RGB values via UDP to a Microcontroller with PWM output

Hi,

i am trying to send rgb matrix values from vvvv via udp to a microcontroller. The Mc waits for UDP packets and converts them to PWM. I dont have a problem on the MC side as i tested it allready with other software.
Unfortunaletly i don’t know which nodes to use to send correct UDP values via vvvv. I tried to make a patch with RGB->vector->asstring value combination (inspired from westbam & digipic posts), and it sends son-mething via UDP but the microcontroller does not understand the data which vvvv is sending.

I guess i also need to explain the MC the UDP header and packetnumber etc. but where and how do i give the information? The UDP node has only 2 pins with destination IP and Port informations.

Also i think that the udp data from vvvv is send too fast, that the MC freezes after a minute or so, but this may be due to missing header, packet information from the vvvv side.

And when i use asstring value node, what has to be the Subtype?

I am attaching also a simple patch of what i am trying to do.

Thanks for any help in advance…

udp-test.v4p (21.7 kB)

converting the values to a string and sending this is probably not a good idea. for this purpose we have the new data type ‘Raw’, which is the data as bytes. so use the node AsRaw (Value) and select the number format your MC understands.

udp-test.v4p (16.6 kB)

tonfilm thanks for your reply.
yes i get now leds lighting at least, but still have problems with data sending as 16x8 pixels :/

Edit: Only the first 24 pixels are scrolling…:S
Edit: Ok, i used vector instead of cons and i am now able to control all pixels. Another problem is that i guess i cant filter all useless data coming from udp. Is there a way to configure udp client with f.e cons to define the header, packetnumber etc.? Because pixels are flickering and looks like the MC is freezing after a minute…

hm, you mean something like Append or Cons (Raw), which concatenates two or more raw chunks? this would be a quick plugin coding. do you have experience with C#? then head over there: plugins
the pin data type in C# is System.IO.Stream…

Solved header etc. definitions with Cons (Spreads) node.
I was already looking to that Template() node and was so excited as i saw C# input window ;) System.IO.Stream was the pin data type what i was searching for a couple of months ago. Will take weeks/months till i get deeper in it though :S
I am happy that i could solve my problem for now. Thank you for your help…