Download

Issues with arduino sesnor data being imported.

Hi I am bringing in external sensor data via the serial port.
Sometimes the code appears on two lines rather than one line (see top left corner of the attached screenshot).
I have tried changing the baud rate and also alternating between carriage return and newline in the arduino serial monitor - this doesn’t seem to have made any difference.
Reducing the float decimal to one decimal place seems to have helped but still my sensor readings do not seem as “clear” in Unreal as they are in the serial monitor.
(Every couple of seconds the float reading gets broken into two parts and this messes up my readings.
Any advice ??

This is my arduino code:

void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(115200);
}

// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
float voltage = sensorValue * (5.0 / 1023.0);
Serial.println(voltage,1);
delay(200); // delay in between reads for stability
}