Protocol receiving analysis (HEX format)

hey there,

i got a datasheet from a manufacturer regarding comm protocol for my device
my plan is to convert this wired to wireless reading

but this device using STM32

the respond from the device will be like the following

Protocol receiving analysis (HEX format)

inputVolt=(u16)(SbufTemp[1]-0x30)*100+ (SbufTemp[2]-0x30)*10+ (SbufTemp[3]-0x30));

outputVolt=(u16)((SbufTemp[5]-0x30)*100+(SbufTemp[6]-0x30)*10+ (SbufTemp[7]-0x30));

Rate=(u16)((SbufTemp[9]-0x30)*100+(SbufTemp[10]-0x30)*10+(SbufTemp[11]-0x30));

Freq=(u16)((SbufTemp[14]-0x30)*100+ (SbufTemp[13]-0x30)*10+(SbufTemp[15]-0x30));

Battery=(u16)((SbufTemp[17]-0x30)*100+ (SbufTemp[18]-0x30)*10+ (SbufTemp[19]-0x30));

Cmdmode=SbufTemp[21];

how can i convert this for my arduino to read the data value in my serial?

the respond from the device will be like the following

Do you mean that you will receive a string of ASCII characters as in your examples, or something else ?

looks like they're sending various values (e.g. inputVolt, battery, ...) in an array of bytes.

each value is represented by several bytes. Each byte has an offset (e.g. -0x30 or '0') and multiplier (e.g. 100). The value is the sum of the bytes after applying the offset and multiplier.

you can probably copy what you posted above directly into your code after you define the variables

UKHeliBob:
Do you mean that you will receive a string of ASCII characters as in your examples, or something else ?

yes, please

Have you tried using the code you posted, as suggested in reply#2?