mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-07 08:23:42 +00:00
seesaw: remove delay from Read(...)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user