How to Serial Out from merge operator

I made a device to control DMX lighting.
It’s shining as expected, but I’m trying to remake it so that the Arduino controls the tape LED.
The firmware for converting UART to WS2812 has been completed, and it has been confirmed that it can be controlled by sending RGB data at 115200bps from the terminal software.
I want to control this from touchdesigner.

If you change DMX to UART, I think you should use Serial DAT.
I set Merge1 to FromOperator and set the COM port and baud rate correctly, but there is no evidence that data is being sent to the Arduino.
What is the possible reason here?

Hi @tci_admin,

Welcome to the community!

can you share a bit of detail on how and in what format you send the data through the Serial DAT?
Which version of TouchDesigner are you using?


Thank you for your reply.
The version of touchdesigner is 099 (64-Bit Build 2019.15230).
Red and blue have fixed values, and only green has a random number, and three kinds of RGB with slightly different colors are repeated to make it glow like a flame.
In this figure, there is a warning mark on Serial1, but I do not have an Arduino at hand and I am not connecting.
I have confirmed that only one grain can be turned on when connecting math9 to chopexec instead of connecting Arduinowo and mergeCHOP.

Hi @tci_admin,

have a look at attached component. One main difference is that the end result is a CHOP with a single channel with many samples instead of a single CHOP with many channels. The Shuffle CHOP is here really helpful.
The CHOP Execute DAT now can read all samples into a single list with the python member channel.vals. This list is in floats by default, so next, using list comprehension we need to convert them to integers and finaly to a bytearray which then can be send over to the Arduino.

Does this help?

toArduino.tox (2.0 KB)

Thank you very much.
I studied while checking the meaning of each CHOP.
It took time, but I understood the working principle.
I’ll arrange it and have fun.
There is one problem before that.
I’m getting an error that
“invalid literal for int() with base 10”
and I tried connecting the oscilloscope, but it seems that no data is being sent.
It is adjusted from 0 to 255 in the math OP, and it seems to be fine, but I cannot find a solution.
Is there any hint here?
That gives me some hope.

Hey @tci_admin,

can you post the file here? The error seems to come from values that are larger than 255…
Could you share also the Arduino Sketch? This way I might be able to tell what the values need to look like.