Fork of DS1820 that can function with the data and parasite power pin being the same.

Dependents:   AutonomousDAQ AutonomousDAQ

Fork of DS1820 by David Pairman

Revision:
8:7f64569563ea
Parent:
7:aceafdd78b28
--- a/DS1820.cpp	Thu Oct 30 05:55:15 2014 +0000
+++ b/DS1820.cpp	Thu Nov 30 05:57:26 2017 +0000
@@ -46,11 +46,11 @@
     _datapin = 0;
     wait_us(3);                 // DXP modified from 5
     if (bit_data) {
-        _datapin.input(); // bring data line high
+         _datapin = 1; // bring data line high
         wait_us(55);
     } else {
         wait_us(55);            // keep data line low
-        _datapin.input();
+        _datapin = 1;
         wait_us(10);            // DXP added to allow bus to float high before next bit_out
     }
 }