Skip to content

Instantly share code, notes, and snippets.

@thisMagpie
Created February 11, 2016 15:38
Show Gist options
  • Save thisMagpie/6771235e0c7af8f7280a to your computer and use it in GitHub Desktop.
Save thisMagpie/6771235e0c7af8f7280a to your computer and use it in GitHub Desktop.
from webiopi.devices.sensor import DS18S20
tmp0 = DS18S20(slave="10-000802de0ee7") # sensor found with "ls /sys/bus/w1/devices/"
print("TEMP: {0} C ").format(tmp0.getCelsius()) # print temperature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment