testing bugs
This commit is contained in:
15
main.go
15
main.go
@@ -63,13 +63,14 @@ func readDataFromDHT(pin *gpio.Pin) ([4]byte, error) {
|
|||||||
time.Sleep(40 * time.Microsecond)
|
time.Sleep(40 * time.Microsecond)
|
||||||
|
|
||||||
// Get Data
|
// Get Data
|
||||||
fmt.Println(pin.Read())
|
time.Sleep(80 * time.Microsecond)
|
||||||
if cyclesForReading(pin, gpio.Low) == Timeout {
|
time.Sleep(80 * time.Microsecond)
|
||||||
return receivedInput, errors.New(fmt.Sprintf(TimeoutErrInitial, "low"))
|
//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"))
|
//if cyclesForReading(pin, gpio.High) == Timeout {
|
||||||
}
|
// return receivedInput, errors.New(fmt.Sprintf(TimeoutErrInitial, "high"))
|
||||||
|
//}
|
||||||
|
|
||||||
// Store cycle number for each low and high pulse
|
// Store cycle number for each low and high pulse
|
||||||
cycles := [80]int{}
|
cycles := [80]int{}
|
||||||
|
|||||||
Reference in New Issue
Block a user