tecnition_ted
New Member
Hi all, I am trying to convert temperature K into temperature C, The formula is straight forward from what I understand K - 273.15 = C. I know the Picaxe cannot use decimal places so I tried these ways without success
Picaxe 08M2
Picaxe 08M2
Code:
setfreq m16
pause 8000
;Maths 1 to change K into C, W12 is where the temperature K is stored
W12 = W12 *100
W12 = W12 -27315
W12 = W12 /100
serout c.0,N2400,("Temperature ",#W12,"C",CR,LF)
;Maths 2 to change K into C, W12 is where the temperature K is stored
W12 = W12 -273
W12 = W12 * 100
W12 = W12 -15
W12 = W12 /100
serout c.0,N2400,("Temperature ",#W12,"C",CR,LF)