Serial communication in touchdesigner working with Uno but not with Mega

That seems very strange. I have never had that sort of problem moving code from an Uno to a Mega. Are they both genuine Arduinos or is one or both a clone?

Have you the option, in touchdesigner, of enabling DTR (one of the serial control signals)?

Stick with the code that does nothing but receive serial data until you get this figured out.

...R