DexterInd / GrovePi

GrovePi is an open source platform for connecting Grove Sensors to the Raspberry Pi.
https://www.dexterindustries.com/grovepi/
Other
490 stars 488 forks source link

The GrovePi sensor connection is unstable!! Under Python. Can you help me? #480

Closed DAnGioi closed 4 years ago

DAnGioi commented 4 years ago

My own program gets stuck after a amount of time getting the DHT sensor data. My Code:

import grovepi import time import math

blue = 0

dht_sensor = 4 grovepi.pinMode(dht_sensor, “INPUT”)

def dht_data(): [temp,humidity] = grovepi.dht(dht_sensor, blue) if not temp is None: string = “[temperature = {:.01f}][humidity = {:.01f}]”.format(temp,humidity) else: string = “waiting for buffer to fill” print(string)

while True: dht_data() time.sleep(15)

All the sensors I used had this problem. Is grove PI flawed?