DS18B20 help


Rsiegel was kind enough to post code for multiple DS18B20’s on one wire. Unfortunately I have no idea on how to convert a serial number like 28FFA873C3170431 to whatever this is:

DeviceAddress tempSensorA = { 0x28, 0xFF, 0x30, 0xCA, 0x64, 0x15, 0x02, 0x7A };

Any help would be greatly appreciated.
Obviously not computer literate,


Add the 0x to each octet.

The top would become {0x28, 0xFF, 0xA8, 0x73, 0xC3, 0x17, 0x04, 0x31}


Thank You!!!
The sketch now works perfectly for all 3 sensors!
Thanks also to Rsiegel for the original sketch.
Looking at my original post now, you would think I would have seen the answer being the first 2 octets are the same.


Glad to hear it worked!!!

I’ll be honest… I wasn’t 100% sure that would work… But sounds like it did!