i am using arduino teensy and i want to send data to processing using another serial, how do i write it in processing?
i am following this tutorial: https://www.youtube.com/watch?v=NhyB00J6PiM
but in my case, i need to use another serial, because Serial.begin already used for big program, so for example i need to use Serial2.begin(9600)
arduino code:
void setup() {
Serial.begin(115200); // already used
Serial2.begin(9600); // processing
}
void loop() {
Serial.println("...") //big code that i am not allow to change
Serial2.println("hello world");
delay(1000);
}
so how do i get Serial2.println value instead of Serial.println in processing