DS1820, DS18B20 single and multi sensor OS6 compliant. Based on Erik's original code. Tested on ST's F767, L152RE and H743 platforms. Using single and multiple sensors up to 15 meters of cable length.

Dependencies:   LCD_i2c_GSOE ESP8266WebserverGSOE DS1820

Files at this revision

API Documentation at this revision

Comitter:
jack1930
Date:
Sat Aug 07 18:57:33 2021 +0000
Parent:
2:2c947079aae0
Commit message:
Vorbereitet fuer Webserver

Changed in this revision

ESP8266WebserverGSOE.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
diff -r 2c947079aae0 -r e8f1dc9131eb ESP8266WebserverGSOE.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ESP8266WebserverGSOE.lib	Sat Aug 07 18:57:33 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/jack1930/code/ESP8266WebserverGSOE/#0d5c64c91538
diff -r 2c947079aae0 -r e8f1dc9131eb main.cpp
--- a/main.cpp	Sat Aug 07 18:17:28 2021 +0000
+++ b/main.cpp	Sat Aug 07 18:57:33 2021 +0000
@@ -7,7 +7,10 @@
 DigitalOut led(LED1);
 lcd mylcd;
 
-#define DATA_PIN        PB_0
+#define DATA_PIN        PB_0  //Anschluss S
+//GND Anschluss -
+//3,3V mittlerer Anschluss
+
 #define MAX_PROBES      16
 DS1820* probe[MAX_PROBES];
 
@@ -55,10 +58,9 @@
                 Temp[i] = probe[i]->temperature();  // get read temp again if error
                 DS_error++;
             }
-            printf("Probe %d:  %3.2f %cc\r\n",i,Temp[i],0xb0);
-            mylcd.clear();
-            mylcd.cursorpos(0);
-            mylcd.printf("%3.1f",Temp[i]);
+
+            mylcd.cursorpos(0x40);
+            mylcd.printf("%3.1f    ",Temp[i]);
         }
         printf("\nDS errors:  %d\n\n", DS_error);