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

Dependencies:   mbed

Revision:
1:f8aa0ff8d04a
Parent:
0:1197076b78f4
--- 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