why this dont work for me?
i got an error always like this:
File “testt.py”, line 6
sensor = seeed_dht.DHT(“11”, 5)
^
IndentationError: expected an indented block
or
just do nothing if i modify something
i want to make an iot smart garden (https://www.instructables.com/Raspberry-Pi-Powered-IOT-Garden/) i know grovepi+ is different
i would like to make this project with my raspberry zero and grove base hat for raspberry zero
but nothing wants to work
import time
import seeed_dht
from grove.grove_moisture_sensor import GroveMoistureSensor
def main():
sensor = seeed_dht.DHT("11", 5)
PIN = 0
sensor = GroveMoistureSensor(PIN)
while True:
humi, temp = sensor.read()
if not humi is None:
print('DHT{0}, humidity {1:.1f}%, temperature {2:.1f}*'.format(sensor.dht_type, humi, temp))
else:
print('DHT{0}, humidity & temperature: {1}'.format(sensor.dht_type, temp))
m = sensor.moisture
if 0 <= m and m < 300:
result = 'Dry'
elif 300 <= m and m < 600:
result = 'Moist'
else:
result = 'Wet'
print('Moisture value: {0}, {1}'.format(m, result))
time.sleep(1)
if __name__ == '__main__':
main()