seesaw: remove delay from Read(...)

This commit is contained in:
Thomas Richner
2023-11-01 21:31:30 +01:00
committed by BCG
parent f7b80ef95a
commit 68da68c8c8
3 changed files with 20 additions and 15 deletions
+5 -1
View File
@@ -4,6 +4,7 @@ import (
"machine"
"strconv"
"time"
"tinygo.org/x/drivers/seesaw"
)
@@ -18,8 +19,11 @@ func main() {
dev.Address = 0x36
// the soil sensor is especially slow, let's give it some more time
dev.ReadDelay = readDelay
var buf [2]byte
err := dev.Read(seesaw.ModuleTouchBase, seesaw.FunctionTouchChannelOffset, buf[:], readDelay)
err := dev.Read(seesaw.ModuleTouchBase, seesaw.FunctionTouchChannelOffset, buf[:])
if err != nil {
panic(err)
}