Use GPIO 17/27 depending on architecture
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Søren Rasmussen 2024-06-17 17:47:25 +02:00
parent 4edfc7584e
commit 861d7211aa
3 changed files with 30 additions and 10 deletions

View file

@ -7,16 +7,6 @@ import (
)
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
on = 1
)

15
internal/hw/pins_arm.go Normal file
View 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
)

View 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
)