diff --git a/main.go b/main.go index 234d9b1..db9a727 100644 --- a/main.go +++ b/main.go @@ -63,13 +63,14 @@ func readDataFromDHT(pin *gpio.Pin) ([4]byte, error) { time.Sleep(40 * time.Microsecond) // Get Data - fmt.Println(pin.Read()) - if cyclesForReading(pin, gpio.Low) == Timeout { - return receivedInput, errors.New(fmt.Sprintf(TimeoutErrInitial, "low")) - } - if cyclesForReading(pin, gpio.High) == Timeout { - return receivedInput, errors.New(fmt.Sprintf(TimeoutErrInitial, "high")) - } + time.Sleep(80 * time.Microsecond) + time.Sleep(80 * time.Microsecond) + //if cyclesForReading(pin, gpio.Low) == Timeout { + // return receivedInput, errors.New(fmt.Sprintf(TimeoutErrInitial, "low")) + //} + //if cyclesForReading(pin, gpio.High) == Timeout { + // return receivedInput, errors.New(fmt.Sprintf(TimeoutErrInitial, "high")) + //} // Store cycle number for each low and high pulse cycles := [80]int{}