Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
set up temperature resolution on DS18B20; // address on 1wire bus
if (addr[0] == DS18B20) // check we are really using a DS18B20
ds.reset(); // rest 1-Wire; // select DS18B20
ds.write(0x4E); // write on scratchPad
ds.write(0x00); // User byte 0 - Unused
ds.write(0x00); // User byte 1 - Unused
ds.write(0x7F); // set up en 12 bits (0x7F)
ds.reset(); // reset 1-Wire
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.