![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Simple DS1820 sensor demo showing how to use the DS1820 library [https://developer.mbed.org/users/hudakz/code/DS1820/]
Fork of DS1820_Hello by
Diff: main.cpp
- Revision:
- 3:eb195375cde7
- Parent:
- 2:a680194ce6df
- Child:
- 4:9afd6251d15e
--- a/main.cpp Thu Mar 26 21:12:05 2015 +0000 +++ b/main.cpp Fri Mar 27 12:37:34 2015 +0000 @@ -34,14 +34,14 @@ // // for(int i = 0; i < 3; i++) { // if(!ds1820[i].begin()) { -// serial.printf("Couldn't find sensor %d", i); +// serial.printf("Cannot find sensor %d", i); // } else // ds1820[i].startConversion(); // } // wait(1.0); // let DS1820s complete the temperature conversion // while(1) { // for(int i = 0; i < 3; i++) { -// if(ds1820[i].present) { +// if(ds1820[i].isPresent() { // serial.printf("temp%d = %3.1f\r\n", i, ds1820[i].read()); // read temperature // ds1820[i].startConversion(); // start temperature conversion // } @@ -49,7 +49,7 @@ // wait(1.0); // let DS1820s complete the temperature conversion // } //} - +//