cpetrich / counterfeit_DS18B20

How to tell original from fake DS18B20 temperature sensors.
Apache License 2.0
615 stars 50 forks source link

Compilation errors with latest 2024 sketch #45

Open divadiow opened 1 week ago

divadiow commented 1 week ago

Hi. thank for releasing the update! I am getting either this compiling for ESP32-C3 Mini

exit status 1

Compilation error: exit status 1

or the attached for ESP32-C6-WROOM-1 C6.txt

it does compile OK for an ESP8266 but only if I change these two lines to int16

current_min_T = min(current_min_T, (int16_t)(buffer[1]*16 + buffer[0] / 16));
current_max_T = max(current_max_T, (int16_t)(buffer[1]*16 + buffer[0] / 16));
cpetrich commented 1 week ago

Much appreciated, changed the code.

If I'm not mistaken, the error you attach comes from the OneWire library. Are you able to compile other code that uses OneWire.h on the ESP32-C3 Mini?