-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.go
35 lines (31 loc) · 903 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// package main is a module with raspberry pi board component.
package main
import (
"go.viam.com/rdk/components/board"
"go.viam.com/rdk/components/servo"
"go.viam.com/rdk/module"
"go.viam.com/rdk/resource"
"raspberry-pi/pi5"
"raspberry-pi/rpi"
rpiservo "raspberry-pi/rpi-servo"
)
// func init() {
// if isPi5 {
// pi5.RegisterPINCTRL()
// } else {
// // init registers a pi board based on pigpio.
// rpi.RegisterPIGPIO()
// }
// }
func main() {
module.ModularMain(
resource.APIModel{board.API, pi5.Model},
resource.APIModel{board.API, rpi.ModelPi},
resource.APIModel{board.API, rpi.ModelPi4},
resource.APIModel{board.API, rpi.ModelPi3},
resource.APIModel{board.API, rpi.ModelPi2},
resource.APIModel{board.API, rpi.ModelPi1},
resource.APIModel{board.API, rpi.ModelPi0_2},
resource.APIModel{board.API, rpi.ModelPi0},
resource.APIModel{servo.API, rpiservo.Model})
}