Refactor into config file
This commit is contained in:
@@ -1,33 +1,3 @@
|
||||
# from sensors.lib import grove_i2c_temp_hum_mini
|
||||
|
||||
# t= grove_i2c_temp_hum_mini.th02()
|
||||
|
||||
# def get_temperature():
|
||||
# """Get the temperature in Celsius from the TH02 sensor."""
|
||||
# # try:
|
||||
# return t.getTemperature()
|
||||
# # except Exception as e:
|
||||
# # print(f"Error reading temperature: {e}")
|
||||
# # return None
|
||||
|
||||
# def get_humidity():
|
||||
# """Get the humidity in percentage from the TH02 sensor."""
|
||||
# # try:
|
||||
# return t.getHumidity()
|
||||
# # except Exception as e:
|
||||
# # print(f"Error reading humidity: {e}")
|
||||
# # return None
|
||||
|
||||
# import seeed_dht
|
||||
|
||||
# sensor = seeed_dht.DHT("11", 4) # DHT11 sensor on GPIO pin 4
|
||||
|
||||
# def get_humidity_and_temperature():
|
||||
# humi, temp = sensor.read()
|
||||
# return humi, temp
|
||||
|
||||
|
||||
# import sensors.lib.grovepi as grovepi
|
||||
import grovepi
|
||||
import math
|
||||
from sensors.lock import grove_lock
|
||||
|
||||
Reference in New Issue
Block a user