1
0
Fork 0
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:
Karan Misra 2014-02-08 02:21:18 +05:30
parent d2ffacd22c
commit cd54380887
2 changed files with 6 additions and 10 deletions

View file

@ -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 {