Test 1-wire , working wtih parasite power and few sensors with mixed power supply.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
rainerraul
Date:
Wed May 18 10:09:56 2022 +0000
Parent:
0:1197076b78f4
Commit message:
test

Changed in this revision

mbed.bld Show annotated file Show diff for this revision Revisions of this file
onewire.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 1197076b78f4 -r f8aa0ff8d04a mbed.bld
--- a/mbed.bld	Mon May 10 08:14:32 2010 +0000
+++ b/mbed.bld	Wed May 18 10:09:56 2022 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/49a220cc26e0
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file
diff -r 1197076b78f4 -r f8aa0ff8d04a onewire.cpp
--- a/onewire.cpp	Mon May 10 08:14:32 2010 +0000
+++ b/onewire.cpp	Wed May 18 10:09:56 2022 +0000
@@ -10,7 +10,7 @@
 
 
 
-DigitalInOut ow_pin(ONEWIRE_PIN);
+DigitalInOut ow_pin(PB_2);
 
 
 
@@ -207,7 +207,7 @@
 /* reads temperature (scratchpad) of sensor with rom-code id
    output: subzero==1 if temp.<0, cel: full celsius, mcel: frac
    in millicelsius*0.1
-   i.e.: subzero=1, cel=18, millicel=5000 = -18,5000°C */
+   i.e.: subzero=1, cel=18, millicel=5000 = -18,5000�C */
 uint8_t DS18X20_read_meas(uint8_t id[], uint8_t *subzero,
                           uint8_t *cel, uint8_t *cel_frac_bits) {
     uint8_t i;
@@ -280,7 +280,7 @@
 /* converts to decicelsius
    input is ouput from meas_to_cel
    returns absolute value of temperatur in decicelsius
-    i.e.: sz=0, c=28, frac=15 returns 289 (=28.9°C)
+    i.e.: sz=0, c=28, frac=15 returns 289 (=28.9�C)
 0    0    0
 1    625    625    1
 2    1250    250