Parsing numbers from a serial input

phenyl:
The example should output:

And what does it actually output?

Maybe you have the bytes for a multi-byte value in the wrong order?

If you create a struct with the proper datatypes then you can copy the array of received bytes directly into the struct and then just access the values in the struct. Something like (I may not have the syntax exactly correct)

memcpy(&structInstance, &receivedBytes, sizeof(structInstance))

...R