Hi all! I have hooked up a distance sensor and a button to my arduino and managed to successfully send values over to UE5.1.1 via Serial Com plugin. However, right now, I can’t seem to split the lines coming in, such that the individual sensors has different functions within UE. Nothing happens after ‘Switch on String’ node, and nothing is printed. But if I was to just hook to Split, individually it works. I am not sure if its a formatting issue?
I have attached my blueprint screencapture and the following is from my Arduino:
// reading distance sensor
if (distanceCm <= 0)
{
Serial.println("Out of range");
}
else
{
Serial.print("distance ");
Serial.print(distanceCm);
Serial.print("cm");
Serial.println();
}
// read the state of the pushbutton value:
buttonState = digitalRead(BUTTON_PIN);
// check if the pushbutton is pressed. If it is, the buttonState is HIGH:
if (buttonState == HIGH) {
Serial.print("button ");
Serial.print("on");
Serial.println();
} else {
Serial.print("button ");
Serial.print("off");
Serial.println();
}
delay(100);
}
Would appreciate if anyone can point me in the right direction! Thank you in advance