Hardware and software


Sensors I have used:

  • Temperature sensor: DS18B20
  • Anemometer

  • Arduino

    Temperature and wind measurements are collected using Arduino development platform. I have two separate Arduino Unos installed, one is connected to temperature measurement and the other is for wind speed measurements. This is due to physical cabling limitations.

    Raspberry Pi

    The collected data is processed by two Raspberry Pi computers. All graphs, images, photos, tweets etc. are processed automatically on these devices.


    The hardware alone does nothing, software is necessary to create the content. All the software for Arduinos and Raspberry Pis is mostly written by me. Since I am not a coder, I have learned from Internet sources a lot during this project. I have reused and modified - sometimes heavily - code and examples found from public sources. Here is an example bit of code. It generates the 24 h temperature graph.

    # Temperature outside
    rrdtool graph /var/www/saasivu/images/outdaily.png \
    -s "-1d" \
    -a PNG \
    --slope-mode \
    --watermark "$(date +%d-%m-%Y) $(date +%H:%M:%S) (c) Janne Karaste" \
    --title="Temperature in Mäntsälä, Finland, last 24 and 48 hours" \
    --right-axis="1:0" \
    --right-axis-label="Deg C" \
    --vertical-label "Deg C" \
    --height="225" \
    --width="597" \
    'DEF:temp2=/home/pi/sensors/rrddata/temperature.rrd:temp2:AVERAGE' \
    'DEF:yesterday=/home/pi/sensors/rrddata/temperature.rrd:temp2:AVERAGE:end=now-24h:start=end-24h' \
    'VDEF:temp2max=temp2,MAXIMUM' \
    'VDEF:temp2min=temp2,MINIMUM' \
    'CDEF:temp=temp2' \
    'VDEF:slope=temp,LSLSLOPE' \
    'VDEF:cons=temp,LSLINT' \
    'CDEF:trend=temp,POP,slope,COUNT,*,cons,+' \
    'SHIFT:yesterday:86400' \
    'LINE1:yesterday#dddddd:Temperature 24...48 hours ago' \
    'LINE0.5:temp2max#990000' \
    'LINE0.5:temp2min#000099' \
    'GPRINT:temp2:LAST:Current\: %2.1lf C        \j' \
    'CDEF:temp2blue=temp2,0,GT,UNKN,temp2,IF' \
    'LINE1:temp2#ff0000:Temperature last 24 h, above 0' \
    'GPRINT:temp2:MAX:Max\: %2.1lf C        \j' \
    'LINE1:temp2blue#0000cc:Temperature last 24 h, below 0' \
    'GPRINT:temp2:MIN:Min\: %2.1lf C        ' \