finding a bug

This commit is contained in:
Daniel Ledda
2020-10-31 18:35:18 +01:00
parent eea652f3c5
commit 6cf01d2814

View File

@@ -61,8 +61,10 @@ func readDataFromDHTTest(pin *gpio.Pin) ([5]byte, error) {
_ = pin.Watch(gpio.EdgeFalling, func(pin *gpio.Pin) { _ = pin.Watch(gpio.EdgeFalling, func(pin *gpio.Pin) {
edgeChangeTimestamps = append(edgeChangeTimestamps, time.Now().UnixNano()) edgeChangeTimestamps = append(edgeChangeTimestamps, time.Now().UnixNano())
fmt.Print("fall")
}) })
_ = pin.Watch(gpio.EdgeRising, func(pin *gpio.Pin) { _ = pin.Watch(gpio.EdgeRising, func(pin *gpio.Pin) {
fmt.Print("rise")
edgeChangeTimestamps = append(edgeChangeTimestamps, time.Now().UnixNano()) edgeChangeTimestamps = append(edgeChangeTimestamps, time.Now().UnixNano())
}) })