mirror of
https://github.com/kidoman/embd
synced 2025-07-03 03:47:33 +02:00
matrix4x3: client should ensure rpio is initialised before using
This commit is contained in:
parent
d2ffacd22c
commit
cd54380887
2 changed files with 6 additions and 10 deletions
|
@ -5,12 +5,16 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/kid0m4n/go-rpi/interface/keypad/matrix4x3"
|
||||
"github.com/stianeikeland/go-rpio"
|
||||
)
|
||||
|
||||
func main() {
|
||||
rowPins := []int{4, 17, 27, 22}
|
||||
colPins := []int{23, 24, 25}
|
||||
|
||||
rpio.Open()
|
||||
defer rpio.Close()
|
||||
|
||||
keypad := matrix4x3.New(rowPins, colPins)
|
||||
|
||||
for {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue