Hi I am a bit new to processing and do not really know that much. I managed to display some serial data, but what I really need is a GUI to show the temperature from multiple ds18b20 sensors. but I need some help with Splitting the String into multiple Arrays and then converting those Arrays into a int.Could someone help me with this? Any help would be greatly appreciated.
Here is my code:
import processing.serial.*;
Serial myPort;
String myString;
String s = myString;
int nl = 10;
int kleur = 127;
int cold = 20;
void setup()
{
size(500, 500);
background(00);
myPort = new Serial(this, “COM5”, 9600);
}
void draw() {
while (myPort.available() > 0) {
background(0);
String val = myPort.readStringUntil(nl);
if (val != null) {
rect(kleur, 200, 200, 200);
textSize(17);
fill(0, 102, 153, 204);
text(val, 200, 200, 200);
}
}
}