Installing the Temperature Sensor * install the tools that allow you to talk to the I2C bus: sudo apt-get update sudo apt-get install i2c-tools sudo modprobe i2c-bcm2708 sudo modprobe i2c-dev * add the pi user to the I2C user group: sudo usermod -a -G i2c pi logout * Rev 1 board: receive input from the sensor and convert hex to degrees Celsius: i2cget -y 0 0x48 0x00 w | awk '{print(("0x"substr($1,5,2) substr($1,3,1))*0.0625)}' * Rev 2 board: receive input from the sensor and convert hex to degrees Celsius: i2cget -y 1 0x48 0x00 w | awk '{print(("0x"substr($1,5,2) substr($1,3,1))*0.0625)}' * Bash scripts to do above and handle negative temperatures: * Rev 1: #!/bin/bash i2cget -y 0 0x48 0x00 w | awk '{printf("%.2f\n", (a=("0x"substr($1,5,2) substr($1,3,1))*0.0625) >128?a-256:a)}' * Rev 2: #!/bin/bash i2cget -y 1 0x48 0x00 w | awk '{printf("%.2f\n", (a=("0x"substr($1,5,2) substr($1,3,1))*0.0625) >128?a-256:a)}' * make script executable and run: chmod +x tmp102.sh ./tmp102.sh Posting the Temperature Data * blank.json (replace YYYYY with datastream ID): { "version":"1.0.0", "datastreams":[ {"id":"YYYYY", "current_value":"T1"} ] } * make update.sh executable and run: chmod +x update.sh ./update.sh * run the script in the background: nohup ./update.sh > /dev/null & * stop the update.sh script: killall update.sh