Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: AutonomousDAQ AutonomousDAQ
Fork of DS1820 by
Revision 8:7f64569563ea, committed 2017-11-30
- Comitter:
- uci1
- Date:
- Thu Nov 30 05:57:26 2017 +0000
- Parent:
- 7:aceafdd78b28
- Commit message:
- explicitly set data pin high instead of input() which requires a pull-up resistor
Changed in this revision
| DS1820.cpp | Show annotated file Show diff for this revision Revisions of this file | 
--- 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
     }
 }
    