Arduino Forum
Adding a leading 0 to incoming HEX data for conversion to binary
Projects
Programming
jremington
October 6, 2017, 2:38pm
11
for(byte i = 0; i<len; i++) { char buf[4]; sprintf(buf,"%02x ",rxBuf[i]); Serial.print(buf); }
show post in topic
Related topics
Topic
Replies
Views
Activity
Converting CAN-Bus (HEX) values to binary to sort out interessting Bits
Programming
4
5795
May 5, 2021
Store HEX with the leading zero
Programming
8
1229
August 3, 2023
Hexadecimal string to binary
Programming
18
21754
May 5, 2021
How to combine 2 bits of hex can data then convert to decimal?
Programming
5
1774
May 5, 2021
integer leading zeros
Libraries
4
5361
May 6, 2021