Hi!
I’m mapping an Arduino Esplora via serial in Touchdesigner.
For send from Arduino it’s very easy to send different values at the same time with the Serial.println() function.
But how I recieve multiple data FROM touchdesigner to Arduino? At the moment I can recieve one value with serial.read() function. But i don’t know how to recieve multiple values from Touchdesigner.
#include <Esplora.h>
int serialByteRecieve = 0;
void setup() {
// initialize the serial communication:
Serial.begin(9600);
}
void loop() {
// send data only when you receive data:
if (Serial.available() > 0) {
// read the incoming byte:
serialByteRecieve = Serial.read();
// write the value coming from touchdesigner to the rgb led:
Esplora.writeRed(serialByteRecieve);
Esplora.writeGreen(serialByteRecieve);
}
esplora mapping.9.toe (4.5 KB)
Thanks a lot in advance,
joan nosebleed