Yep,
It’s worth noting that we’re probably doing this the hard way. If Grasshopper is anything like Houdini, you’re scattering some points as the origin of each element. This is a nice short list of all the places where we need to sample a color. Assigning this to an attribute bound to each element would be a more efficient way to also do your visualizer, but I digress.
NERD ALERT 
The mesh has over 3 million vertices in it. Each of them has a UV coordinate, but there are only 78 unique coordinates corresponding to each LED element. We want to get just those.
Python has a really useful data structure called set
that is beloved by computer scientists and quixotic nerds. What’s awesome about set
is that it only allows you to define one instance of an entry. So if you’re trying to reduce a large list of entries to only the unique ones, a handy trick is to just add everything into a set
and let Python take care of discarding duplicates.
First we use a SOPtoDAT to extract the data from the sop with your model in it. When building large DAT tables, it’s a good idea to turn off the Viewer flag (circle in the upper left) of the OP, since TD will otherwise helpfully try to draw you a table with 3 million rows and your performance will drop into the single digits.
As shown in the screenshot here, we want to extract the ‘uv’ attribute from the geometry’s Vertices.
Next we want to use a scriptDAT to process all the rows and extract unique UV entries. Here’s the code:
def onCook(scriptOp):
# clear the scriptDAT if it has any data in it and
# define some vars for our input and our set of UVs
scriptOp.clear()
input = scriptOp.inputs[0]
uvSet = set()
# iterate through the entire input table and
# add a tuple for each coordinate to the set
# duplicate entries are automatically discarded
for row in range(input.numRows):
uvSet.add( ( input[row,'uv(0)'].val, input[row,'uv(1)'].val ) )
# make a header for our table
scriptOp.appendRow( ['x', 'y'] )
# iterate through the set and add a row for each entry
for i in uvSet:
scriptOp.appendRow( i )
return
we can take the result of the scriptDAT and send it into a DATtoCHOP to make a CHOP with two channels corresponding to our coordinates. To get the raw values for pixels we use a TOPtoCHOP. This OP has a convenient input for the lookup coordinates to which we can attach our chop with the coordinate channels.
I haven’t worked with an Arduino in a while, but if I were wanting to send RGB lighting data I’d use DMX. The linked file has a shuffleCHOP added to interleave the three channels into a single channel suitable for feeding a DMXoutCHOP.
Link to updated file
Good Luck! 