Help with Strings and hex
Verfasst: Mittwoch 28. August 2024, 16:53
HI all
Please can you help me I am truing to convert a dec number(0-255) into a Hex number that must be send with Serial
to an Controller as in the example attached convert 180dec to hex which is B4 however when I send it to the serial I get 1 byte for B and 1 byte for 4
thus instead of sending the oxB4 as one byte I have 2 bytes 0x0B and 0x04 .
What am I doing wrong please help me out
any help hints is appreciated
Regards
Please can you help me I am truing to convert a dec number(0-255) into a Hex number that must be send with Serial
to an Controller as in the example attached convert 180dec to hex which is B4 however when I send it to the serial I get 1 byte for B and 1 byte for 4
thus instead of sending the oxB4 as one byte I have 2 bytes 0x0B and 0x04 .
What am I doing wrong please help me out
any help hints is appreciated
Regards