Skip to content

Instantly share code, notes, and snippets.

@elizabethn119
Created August 31, 2020 20:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elizabethn119/efd9cbba2f427650401ac7b3918e7d6f to your computer and use it in GitHub Desktop.
Save elizabethn119/efd9cbba2f427650401ac7b3918e7d6f to your computer and use it in GitHub Desktop.
import time
from board import SCL, SDA
import busio
from adafruit_seesaw.seesaw import Seesaw
i2c_bus = busio.I2C(SCL, SDA)
ss = Seesaw(i2c_bus, addr=0x36)
while True:
# read moisture level through capacitive touch pad
touch = ss.moisture_read()
# read temperature from the temperature sensor
temp = ss.get_temp()
print("temp: " + str(temp) + " moisture: " + str(touch))
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment