[Free][Windows only] UE4Duino 2 - Arduino (COM port) communication

Hello,
I tried this solution.
However I see strange value when print on Unreal:

for 23.56 I see " -520849213389117849600.0 " in Unreal.

I put your blueprint to the Event Tick node. The Ardino code is executed when I push a button (a simple if when the button is in high status).

The sketch is:

 buttonState = digitalRead(button);
 //Serial.println(buttonState);
 
 if(buttonState == HIGH) {
          float floatVal = 23.56;
        byte *b = (byte *)&floatVal;
        
        Serial.write(0xFE);
        
        int i;
        for (i = 0; i < 4; i ++){   
            Serial.write(*b);
        }
 }

The blueprint is: ArduinoUE4_blueprint

I set the Control Byte as “254”.

I don’t see anything strange in my code, but maybe I am missing something.

Could you\someone help with this ?

I just want send information from arduino to unreal in the right way without losing information due to different speed.

1 Like