From 5d82dc5b81c8185d350634c3ca3f51c51c0efabf Mon Sep 17 00:00:00 2001 From: Cyrille Nofficial Date: Wed, 18 Dec 2019 00:28:49 +0100 Subject: [PATCH] [gpio] Fix pin refs --- led/led.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/led/led.go b/led/led.go index de920f3..f797694 100644 --- a/led/led.go +++ b/led/led.go @@ -4,7 +4,7 @@ import ( "log" "periph.io/x/periph/conn/gpio" "periph.io/x/periph/host" - "periph.io/x/periph/host/rpi" + "periph.io/x/periph/host/bcm283x" "sync" "time" ) @@ -18,16 +18,17 @@ func init() { } func New() *PiColorLed { - return &PiColorLed{ - pinRed: rpi.P1_22, - pinGreen: rpi.P1_23, - pinBlue: rpi.P1_24, + led := PiColorLed{ + pinRed: bcm283x.GPIO23, + pinGreen: bcm283x.GPIO24, + pinBlue: bcm283x.GPIO25, redValue: 0, greenValue: 0, blueValue: 0, cancelBlinkChan: make(chan interface{}), blinkEnabled: false, } + return &led } type Led interface {