One of the easiest and cheap awesome Pi hacks is DIY-ing your own thermometer.
- Get a hold of a DS18B20 temperature sensor for cheap on Ebay and also a 4.7kOhm resistor. I use a waterproof sensor to be able to monitor the temperature outdoors.
- The sensor has 3 wires. Join blue and red through the resistor and hook it up to your Pi like so:
- Black goes to ground/0V (PIN 6), which is third from the top, right column. Red to 3.3V (PIN 1), which is top left. Blue to GPIO4 (PIN 7), which fourth from the top, left column.
- Log in to your Pi via SSH/console
- Enable 1-Wire in raspi-config
sudo raspi-config-> “5 Interfacing options” -> “P7 1-wire” -> “Enable”
- Your sensor should now be listed in
- Try and read it! Your sensor will have a unique id. Mine is 28-031650e12eff. So I can simply read it like so:
44 00 4b 46 7f ff 0c 10 94 : crc=94 YES 44 00 4b 46 7f ff 0c 10 94 t=4250
Temperature is 4.25 degrees celsius!