Use GPIO 17/27 depending on architecture
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
4edfc7584e
commit
861d7211aa
3 changed files with 30 additions and 10 deletions
|
@ -7,16 +7,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
pinDoorOpen = 17
|
|
||||||
pinFanPower = 22
|
|
||||||
pinCoolerPower = 23
|
|
||||||
pinHeaterPower = 24
|
|
||||||
pinLightsPower = 25
|
|
||||||
|
|
||||||
// GPIO21 is located at pin 13 on RPi 1B rev 1. Rev 2 and never boards
|
|
||||||
// has GPIO27 here.
|
|
||||||
pinOneWirePower = 21
|
|
||||||
|
|
||||||
off = 0
|
off = 0
|
||||||
on = 1
|
on = 1
|
||||||
)
|
)
|
||||||
|
|
15
internal/hw/pins_arm.go
Normal file
15
internal/hw/pins_arm.go
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
//go:build arm
|
||||||
|
|
||||||
|
package hw
|
||||||
|
|
||||||
|
const (
|
||||||
|
pinDoorOpen = 17
|
||||||
|
pinFanPower = 22
|
||||||
|
pinCoolerPower = 23
|
||||||
|
pinHeaterPower = 24
|
||||||
|
pinLightsPower = 25
|
||||||
|
|
||||||
|
// GPIO21 is located at pin 13 on RPi 1B rev 1. Rev 2 and never boards
|
||||||
|
// has GPIO27 here.
|
||||||
|
pinOneWirePower = 21
|
||||||
|
)
|
15
internal/hw/pins_others.go
Normal file
15
internal/hw/pins_others.go
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
//go:build !arm
|
||||||
|
|
||||||
|
package hw
|
||||||
|
|
||||||
|
const (
|
||||||
|
pinDoorOpen = 17
|
||||||
|
pinFanPower = 22
|
||||||
|
pinCoolerPower = 23
|
||||||
|
pinHeaterPower = 24
|
||||||
|
pinLightsPower = 25
|
||||||
|
|
||||||
|
// GPIO21 is located at pin 13 on RPi 1B rev 1. Rev 2 and never boards
|
||||||
|
// has GPIO27 here.
|
||||||
|
pinOneWirePower = 27
|
||||||
|
)
|
Loading…
Reference in a new issue