Sensors are short type data, stm32 will split into two short type data uint8 data transmission
PC with byte type variable receiving, could you tell me how to after receiving two byte data splicing into short and right,
CodePudding user response:
Byte [] bytes=new byte [2] {0 x31, 0 x32};Short under-16=(((short) bytes [0] <8) + bytes [1]);