Documentation ¶
Index ¶
- type Daemon
- type Parser
- func (p *Parser) Button(w http.ResponseWriter, r *http.Request)
- func (p *Parser) CloseDoor(w http.ResponseWriter, r *http.Request)
- func (p *Parser) Next() (rtn *Status)
- func (p *Parser) OpenDoor(w http.ResponseWriter, r *http.Request)
- func (p *Parser) Recal(w http.ResponseWriter, r *http.Request)
- func (p *Parser) Start()
- func (p *Parser) Status(w http.ResponseWriter, r *http.Request)
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Daemon ¶
type Daemon struct {
// contains filtered or unexported fields
}
Daemon monitors the garage door, and stabs mice that run around
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser wraps around the arduino and provides a simple way to get status and perform limited control on a garage door opener
func (*Parser) Button ¶
func (p *Parser) Button(w http.ResponseWriter, r *http.Request)
Button punches the button
func (*Parser) CloseDoor ¶
func (p *Parser) CloseDoor(w http.ResponseWriter, r *http.Request)
CloseDoor closes the door
func (*Parser) OpenDoor ¶
func (p *Parser) OpenDoor(w http.ResponseWriter, r *http.Request)
OpenDoor Opens the doore
type Status ¶
type Status struct { Millis uint64 `json:"millis"` //64 bits Pos uint64 `json:"pos"` //16 bits FloorADC uint64 `json:"floor_adc"` //16bits CeilingADC uint64 `json:"ceiling_adc"` //16bits PercentOpen uint64 `json:"percent_open"` //8bits Closed bool `json:"closed"` FullyOpen bool `json:"fully_open"` }
Status is the message the garage door emits
func (*Status) ParseString ¶
ParseString parses the passed string for status bits
Click to show internal directories.
Click to hide internal directories.