finding a bug

This commit is contained in:
Daniel Ledda
2020-10-31 16:29:21 +01:00
parent 720033f4d0
commit 2082ba3e4d

View File

@@ -6,6 +6,7 @@ import (
"github.com/warthog618/gpio"
"math"
"time"
"strconv"
)
const Timeout = math.MaxInt32
@@ -43,7 +44,12 @@ func main() {
if err != nil {
fmt.Println(fmt.Sprintf("Bad read! Reason: %s!", err.Error()))
} else {
fmt.Println(dhtData)
fmt.Println(
strconv.FormatInt(int64(dhtData[0]), 2),
strconv.FormatInt(int64(dhtData[1]), 2),
strconv.FormatInt(int64(dhtData[2]), 2),
strconv.FormatInt(int64(dhtData[3]), 2),
strconv.FormatInt(int64(dhtData[4]), 2))
}
}