6 function parse_value(str)
9 if string.find(str,"temp0: Temp C:") then
10 last_temp = tonumber(string.sub(str,15))
11 os.execute(string.format("rrdtool update /home/sensortemp.rrd -t temp N:%f", last_temp))
12 --print(string.format("t: %f Grad Celsius",last_temp))
14 if string.find(str,"photo0: Photo:") then
15 last_light = tonumber(string.sub(str,15))
16 os.execute(string.format("rrdtool update /home/sensorlight.rrd -t light N:%d", last_light))
17 --print(string.format("p: %d",last_light))
22 local line = io.read("*line")