' ' PicAxe + Jabber/GTalk thermometer! ' v0.1, by Stelios M. (steliosm@steliosm.net) ' ' ' Protocol Description: ' ver 1 ' s: - Set the as status ' c:: - Send the to user ' ' Define some variables b1 = 0 main: ' ' Read the values from the DS18B20 and push them out the serial port. ' A small python script will post the data to Jabber! ' ' Turn on the LED high 1 gosub read_temp ' Send the data out ' Use 's' for status message b1=b1+1 if b1 = 10 then ' Send the temperatuse value as a chat message to user gosub send_value_as_chat ' Reset the counter b1 = 0 end if ' Set the temperature value as a status message gosub send_value_as_status low 1 ' Pause for 1 min before sending another update ' You might need to adjust this. pause 60000 ' Do the whole thing again! goto main read_temp: ' ' Read the temperature value and store it into b0 variable ' readtemp 2, b0 return send_value_as_status: ' ' Set the value as status message ' sertxd ("s:Temperature is ", #b0, " C.",13,10) return send_value_as_chat: ' ' Send the value as chat message to user ' Set the user JID here ' sertxd ("c:Temperature is ", #b0, " C.:stelios@localhost",13,10) return