Expand example to cover new Pi 4 ReadPull() interface

This commit is contained in:
Walt Drummond 2019-11-28 11:39:02 -08:00
parent 10d3b57bb6
commit be82a08f8a

View File

@ -23,10 +23,10 @@ func main() {
// Pull up and read value // Pull up and read value
pin.PullUp() pin.PullUp()
fmt.Printf("PullUp: %d\n", pin.Read()) fmt.Printf("PullUp: %d, %d\n", pin.Read(), pin.ReadPull())
// Pull down and read value // Pull down and read value
pin.PullDown() pin.PullDown()
fmt.Printf("PullDown: %d\n", pin.Read()) fmt.Printf("PullDown: %d, %d\n", pin.Read(), pin.ReadPull())
} }