Skip to content

Commit

Permalink
Update bbn_m5atomS3_lite_DS18B20.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrouch authored Nov 6, 2024
1 parent 7bbf13d commit 360eee5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bbn_m5atomS3_lite_DS18B20/bbn_m5atomS3_lite_DS18B20.ino
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ void setup() {
}
}

void byte_to_hex_ascii(unsigned char byte, char* hex_str) {
void byte_to_hex_ascii(unsigned char byte, char hex_str[3]) {
sprintf(hex_str, "%02X", byte);
}

void addressToStr(DeviceAddress deviceAddress, char str[17]) {
for (uint8_t i = 0; i < 8; i++) {
char a[3];
byte_to_hex_ascii(deviceAddress[i], &a);
byte_to_hex_ascii(deviceAddress[i], a);
str[2 * i] = a[0];
str[2 * i + 1] = a[1];
}
Expand Down

0 comments on commit 360eee5

Please sign in to comment.