I buyed a DS18B20 and a PICAXE 18x.
I have connected the wire to the chip (The same chip as the LCD).
I have connected the two power wires to the 4,5v batteybox.
I found a script that writes the temperature every 15. sec. But it only shows 0,0,0,0.
Is it the power, the script or the connection wire?
The script:
I have connected the wire to the chip (The same chip as the LCD).
I have connected the two power wires to the 4,5v batteybox.
I found a script that writes the temperature every 15. sec. But it only shows 0,0,0,0.
Is it the power, the script or the connection wire?
The script:
Code:
for b0= 0 to 255 'begin 256 data readings @ time set by WAIT/SLEEP
pulsout 2,500 'brief flash from pin 2 LED indicates datalogging
readtemp 1,b1 'direct Celsius reading of DS18B20 temp. returned
serout 2,n2400,(#b1,44) 'Now allows display of data as gathered too !
write b0,b1 'sequentially write values to EEPROM locations
wait 15 'Checks every 15 secs (max 65)-alter to suit etc
next b0 'Gathering automatically stops after 256 samples
Last edited: