Skip to content

Instantly share code, notes, and snippets.

@thisMagpie
Created February 18, 2016 16:35
Show Gist options
  • Save thisMagpie/dd7a27192b455f751287 to your computer and use it in GitHub Desktop.
Save thisMagpie/dd7a27192b455f751287 to your computer and use it in GitHub Desktop.
from webiopi.devices.sensor import DS18S20
import datetime
# sensors found with "ls /sys/bus/w1/devices/"
tmp0 = DS18S20(slave="10-000802de0ee7")
tmp1 = DS18S20(slave="10-000802de4b20")
while True:
print("{0} TEMP0: {1}C TEMP1: {2}C").format(datetime.datetime.now(),
tmp0.getCelsius(),
tmp1.getCelsius())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment