[gpio] Fix pin refs
This commit is contained in:
parent
fd692fc551
commit
5d82dc5b81
11
led/led.go
11
led/led.go
@ -4,7 +4,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"periph.io/x/periph/conn/gpio"
|
"periph.io/x/periph/conn/gpio"
|
||||||
"periph.io/x/periph/host"
|
"periph.io/x/periph/host"
|
||||||
"periph.io/x/periph/host/rpi"
|
"periph.io/x/periph/host/bcm283x"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
@ -18,16 +18,17 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func New() *PiColorLed {
|
func New() *PiColorLed {
|
||||||
return &PiColorLed{
|
led := PiColorLed{
|
||||||
pinRed: rpi.P1_22,
|
pinRed: bcm283x.GPIO23,
|
||||||
pinGreen: rpi.P1_23,
|
pinGreen: bcm283x.GPIO24,
|
||||||
pinBlue: rpi.P1_24,
|
pinBlue: bcm283x.GPIO25,
|
||||||
redValue: 0,
|
redValue: 0,
|
||||||
greenValue: 0,
|
greenValue: 0,
|
||||||
blueValue: 0,
|
blueValue: 0,
|
||||||
cancelBlinkChan: make(chan interface{}),
|
cancelBlinkChan: make(chan interface{}),
|
||||||
blinkEnabled: false,
|
blinkEnabled: false,
|
||||||
}
|
}
|
||||||
|
return &led
|
||||||
}
|
}
|
||||||
|
|
||||||
type Led interface {
|
type Led interface {
|
||||||
|
Loading…
Reference in New Issue
Block a user