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.
Fork of DS1820_HelloWorld by
Homepage
Import program
00001 00002 #include "mbed.h" 00003 #include "DS1820.h" 00004 00005 DS1820 probeInt(A0); 00006 DS1820 probeExt(A1); 00007 Timer t; 00008 int main() { 00009 probeInt.unassignedProbe(A0); 00010 00011 probeExt.unassignedProbe(A1); 00012 00013 while(1) { 00014 probeInt.convertTemperature(true, DS1820::all_devices); // Start temperature conversion 00015 printf("TempInt value=%f\r\n", probeInt.temperature()); 00016 00017 probeExt.convertTemperature(true, DS1820::all_devices); // Start temperature conversion 00018 printf("TempRoom value=%f\r\n", probeExt.temperature()); 00019 } 00020 } 00021