Um dumb ■■■ question. Ive got this plugin all set up and running with the Arduino. In the arduino code if i have a changing float called ‘sensorValue’ how do I convert that to the serial byte that Unreal expects? in the Arduino example the bit about the Float says:
float fVal = 12.34f;
byte* fBuffer = reinterpret_cast<byte*>(&fVal);
Serial.write(fBuffer, 4);
what is12.34f? some arbitary? float?
so could i do this???
float fVal = sensorValue;
byte* fBuffer = reinterpret_cast<byte*>(&fVal);
Serial.write(fBuffer, 4);