Left for archival purposes.

User avatar
By Apesp
#6866 I saw that the nodeMCU has now a ds18b20 module (source here: https://github.com/nodemcu/nodemcu-firm ... s18b20.lua)
Would it be possible to add a function to provde the ds18b20 sensor id? something along the lines of:

function sensor_id(addr)

id = string.format("%02X %02X %02X %02X %02X %02X %02X %02X", addr:byte(1,8));
id = id:gsub("%s+", "");
print('Sensor Addr: ', id);
return id

end

Thanks
Armin