mirror of
https://github.com/stianeikeland/go-rpio.git
synced 2025-01-23 02:31:05 +01:00
Expand example to cover new Pi 4 ReadPull() interface
This commit is contained in:
parent
10d3b57bb6
commit
be82a08f8a
|
@ -23,10 +23,10 @@ func main() {
|
|||
|
||||
// Pull up and read value
|
||||
pin.PullUp()
|
||||
fmt.Printf("PullUp: %d\n", pin.Read())
|
||||
fmt.Printf("PullUp: %d, %d\n", pin.Read(), pin.ReadPull())
|
||||
|
||||
// Pull down and read value
|
||||
pin.PullDown()
|
||||
fmt.Printf("PullDown: %d\n", pin.Read())
|
||||
fmt.Printf("PullDown: %d, %d\n", pin.Read(), pin.ReadPull())
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user