I have a DS18B20 Temperature Sensor connected to the display via a PICAXE 20M2 running this code from the manual
It runs as it should but when the temperature drops below 0 and then rises again the minus sign stays on the display !!.
I have found this in another part of my program all ok up to 99 but if it reads 100 the 1 stays on the screen, I have tried putting a space in front of two digit numbers but has no effect.
Code:
temp:
pause 500
serout B.3,N2400, (0)
pause 400
readtemp B.4,b11 ; read value into b1
if b11 > 127 then negative ; test for negative
serout B.3,N2400,(254,142,#b11)
pause 90
goto main1
negative:
let b11 = b11 - 128 ; adjust neg value
serout B.3,N2400,(254,141,"-")
serout B.3,N2400,(254,142,#b11)
pause 100
goto main1
I have found this in another part of my program all ok up to 99 but if it reads 100 the 1 stays on the screen, I have tried putting a space in front of two digit numbers but has no effect.