well i am not receiving a single float at once (eg 512) but splited into single bytes. thats why i have got that union-tag to merge it (one float).
i dont know how to handle multiple floats, event not sure if the incoming bytes are always pairs of four…
unfortuately i cant use the serial monitor along with that serial connection with flash. it crashes
I had a similar problem with writing to an LCD and not being able to use the Serial monitor. I moved the LCD to a software serial port so I could use the serial monitor to troubleshoot. It was an eye opener!
hey sacman, thanks for the info. i will give it a try.
edit:
sorry guys forget about this
there was a mistake somewhere else.
so it works like this:
u.b[0] = Serial.read();
u.b[1] = Serial.read();
u.b[2] = Serial.read();
u.b[3] = Serial.read();
value1 = u.ival;