forked from dchote/talkiepi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
talkiepi.go
45 lines (36 loc) · 856 Bytes
/
talkiepi.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
36
37
38
39
40
41
42
43
44
45
package talkiepi
import (
"crypto/tls"
"github.com/dchote/gpio"
"github.com/dchote/gumble/gumble"
"github.com/dchote/gumble/gumbleopenal"
)
// Raspberry Pi GPIO pin assignments (CPU pin definitions)
const (
OnlineLEDPin uint = 18
ParticipantsLEDPin uint = 23
TransmitLEDPin uint = 24
TransmitLED2Pin uint = 7
TransmitLED3Pin uint = 12
ButtonPin uint = 25
)
type Talkiepi struct {
Config *gumble.Config
Client *gumble.Client
Address string
AltAddress string
TLSConfig tls.Config
ConnectAttempts uint
Stream *gumbleopenal.Stream
ChannelName string
IsConnected bool
IsTransmitting bool
GPIOEnabled bool
OnlineLED gpio.Pin
ParticipantsLED gpio.Pin
TransmitLED gpio.Pin
Transmit2LED gpio.Pin
Transmit3LED gpio.Pin
Button gpio.Pin
ButtonState uint
}