SupposedlySleeping
SupposedlySleeping

Reputation: 113

Arduino-Processing Serial.send/Serial.get interaction

I'm trying to get my Arduino environment to send data to processing for a data visualization project.

I have managed to get the handshake working and can Serial.println(...) to print the data I need from Arduino to the Processing console. What I need now is to somehow use that data to alter a variable within Processing.

I know that neither of the methods that I mention in the title exist within the Serial class but I was hoping someone would know how to manage this functionality.

Thanks in advance!

Upvotes: 1

Views: 66

Answers (1)

Dan12-16
Dan12-16

Reputation: 351

I will assume that you are using the serialEvent method in processing. Example code:

String val = myPort.readStringUntil('\n');

Where myPort is the port that your android device is on.

Upvotes: 1

Related Questions