GSOE Belueftung DS18B20

Dependencies:   LCD_i2c_GSOE DS1820

Files at this revision

API Documentation at this revision

Comitter:
hudakz
Date:
Sun Jul 19 19:29:57 2020 +0000
Parent:
11:1be668e096a2
Child:
13:06a3997b1557
Commit message:
Simple DS1820 sensor demo.

Changed in this revision

DS1820.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show diff for this revision Revisions of this file
--- a/DS1820.lib	Thu Apr 04 20:48:03 2019 +0000
+++ b/DS1820.lib	Sun Jul 19 19:29:57 2020 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/users/hudakz/code/DS1820/#db94b6510df6
+http://developer.mbed.org/users/hudakz/code/DS1820/#16537aa25bd9
--- a/main.cpp	Thu Apr 04 20:48:03 2019 +0000
+++ b/main.cpp	Sun Jul 19 19:29:57 2020 +0000
@@ -22,7 +22,7 @@
     if (ds1820.begin()) {
         while (1) {
             ds1820.startConversion();   // start temperature conversion from analog to digital
-            wait(1.0);                  // let DS1820 complete the temperature conversion
+            ThisThread::sleep_for(1000);// let DS1820 complete the temperature conversion
             result = ds1820.read(temp); // read temperature from DS1820 and perform cyclic redundancy check (CRC)
             switch (result) {
                 case 0:                 // no errors -> 'temp' contains the value of measured temperature
@@ -88,7 +88,7 @@
         pc.printf("----------------\r\n");
         for (int i = 0; i < sensorsFound; i++)
             ds1820[i]->startConversion();       // start temperature conversion from analog to digital
-        wait(1.0);                              // let DS1820 sensors complete the temperature conversion
+        ThisThread::sleep_for(1000);            // let DS1820 sensors complete the temperature conversion
         for (int i = 0; i < sensorsFound; i++) {
             if (ds1820[i]->isPresent())
                 pc.printf("temp[%d] = %3.1f%cC\r\n", i, ds1820[i]->read(), 176); // read temperature
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Sun Jul 19 19:29:57 2020 +0000
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/mbed-os/#3ab72c71b75cb9cb91160a54fba22ec43b036ed2
--- a/mbed.bld	Thu Apr 04 20:48:03 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file