hixel
Published

Raspberry Thermometer v2

Easy thermometer based on a Raspberry Pi 3 and a DS18B20 sensor. New updates: LCD 16x2.

BeginnerShowcase (no instructions)30 minutes748
Raspberry Thermometer v2

Things used in this project

Story

Read more

Schematics

Fritzing File

Code

Python Script

Python
#!/usr/bin/env python

import time
import RPi.GPIO as GPIO
import LiquidCrystalPi
from w1thermsensor import W1ThermSensor

GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)

LCD = LiquidCrystalPi.LCD(11, 12, 15, 16, 18, 22)
LCD.begin(16,2)
LCD.nextline()

sensor = W1ThermSensor()

while True:
        temperature = sensor.get_temperature()
        print("The temperature is %s celsius" % temperature)
        time.sleep(1)
        LCD.write(" ")
        LCD.write(str(temperature))
        LCD.write(" *C")
        time.sleep(2)

Python module w1thermsensor

Python Module LiquidCrystalPi

Credits

hixel

hixel

2 projects • 3 followers

Comments