Hello,
If you are using the Processing Serial library these are the Processing references:
- https://processing.org/tutorials/electronics/
- https://processing.org/reference/libraries/serial/Serial.html
- Numerous forum topics
- Examples (simple) that come with Processing:
There are numerous topics on the Internet on Arduino and Processing communication.
This is a simple working example:
Arduino
int i;
void setup()
{
Serial.begin(9600); //Begin Serial Communication with a baud rate of 9600
}
void loop()
{
Serial.print(i);
Serial.print('\n');
i++;
if (i>1023) i = 0;
delay(100);
}
Processing side:
https://processing.org/reference/libraries/serial/Serial_readStringUntil_.html
Also you will need to trim() myString
before converting it to an int
or float
.
References:
:)