Sub Main () const DallasPin as Byte = 9 dim busOkay as Boolean dim index as Integer dim value as Byte, deviceCount as Byte, deviceIndex as Byte dim romArray (1 to 8) as Byte call FlashLED (GreenLED, 2) call OpenSerialPort (1, 19200) call NewLine Debug.print "Dallas 1-Wire Test" call NewLine if not Reset_1Wire (DallasPin) then Debug.print "No 1-wire devices on bus..." Exit Sub end if ' Only need to run SearchROM when you remove or add devices... ' Note that this has changed since last version, so even if you've ' run SearchROM before you'll need to run it once with this version. ' Thus, after you've run this once, you can comment out the following line... deviceCount = SearchROM_1Wire (DallasPin) ' ...and uncomment this line, unless you add or remove devices. ' deviceCount = GetDeviceCount_1Wire Debug.print CStr (deviceCount); " device"; if deviceCount > 1 then Debug.print "s"; end if Debug.print " found..." if ParasiticPowered_1820 (DallasPin) then Debug.print "Parasitic power" else Debug.print "Supplied power" end if call NewLine do for deviceIndex = 0 to deviceCount - 1 Debug.print "Device "; CStr (deviceIndex); ": "; call PutS (GetTemperature_1820 (DallasPin, deviceIndex)) Debug.print " degrees" next call NewLine call Delay (0.5) loop End Sub