DS1820 library for multiple devices
Dependencies: LinkedList
Dependents: DS1820_HelloWorld FindingTemp ThermalWake ThermalWake2019Code
Fork of DS1820 by
Diff: DS1820.cpp
- Revision:
- 15:00ec4f27d7f5
- Parent:
- 14:c591209285e9
--- a/DS1820.cpp Sun Jan 08 17:26:21 2017 +0000 +++ b/DS1820.cpp Thu Mar 09 04:00:53 2017 +0000 @@ -466,3 +466,12 @@ } +// Contributed by John M. Larkin (jlarkin@whitworth.edu) +unsigned long long DS1820::whoAmI() { +// This will return the 64 bit address of the connected DS1820 + unsigned long long myName = 0; + for (int i = 0; i<8; i++) { + myName = (myName<<8) | _ROM[i]; + } + return myName; +} \ No newline at end of file