Documentation
¶
Index ¶
- Constants
- func GetBlynkStatus(status uint16) string
- type Blynk
- func (g *Blynk) AddReaderHandler(pin uint, fn func(pin uint, writer io.Writer))
- func (g *Blynk) AddWriterHandler(pin uint, fn func(pin uint, reader io.Reader))
- func (g *Blynk) Connect() error
- func (g *Blynk) DeleteReaderHandler(pin uint)
- func (g *Blynk) DeleteWriterHandler(pin uint)
- func (g *Blynk) DigitalRead(pin int) error
- func (g *Blynk) DigitalWrite(pin int, value bool) error
- func (g *Blynk) DisableLogo(state bool)
- func (g *Blynk) Disconnect() error
- func (g *Blynk) EMail(to string, subject string, msg string) error
- func (g *Blynk) Notify(msg string) error
- func (g *Blynk) Processing()
- func (g *Blynk) SetDebug()
- func (g *Blynk) SetServer(Server string, Port int, SSL bool)
- func (g *Blynk) SetUseSSL(ssl bool)
- func (g *Blynk) Stop() error
- func (g *Blynk) Tweet(msg string) error
- func (g *Blynk) VirtualRead(pins ...int) error
- func (g *Blynk) VirtualWrite(pin int, value string) error
- type BlynkBody
- type BlynkCommand
- type BlynkHead
- type BlynkMessage
- type BlynkRespose
Constants ¶
View Source
const ( BLYNK_SUCCESS uint16 = 200 BLYNK_ILLEGAL_COMMAND uint16 = 2 BLYNK_NOT_REGISTERED uint16 = 3 BLYNK_NOT_AUTHENTICATED uint16 = 5 BLYNK_NOT_ALLOWED uint16 = 6 BLYNK_NO_ACTIVE_DASHBOARD uint16 = 8 BLYNK_INVALID_TOKEN uint16 = 9 BLYNK_NTF_INVALID_BODY uint16 = 13 BLYNK_NTF_NOT_AUTHORIZED uint16 = 14 BLYNK_NTF_EXCEPTION uint16 = 15 )
View Source
const Version = "0.0.5"
Variables ¶
This section is empty.
Functions ¶
func GetBlynkStatus ¶ added in v0.0.4
Types ¶
type Blynk ¶
type Blynk struct { APIkey string OnReadFunc func(*BlynkRespose) // contains filtered or unexported fields }
func (*Blynk) AddReaderHandler ¶ added in v0.0.5
func (*Blynk) AddWriterHandler ¶ added in v0.0.5
func (*Blynk) DeleteReaderHandler ¶ added in v0.0.5
func (*Blynk) DeleteWriterHandler ¶ added in v0.0.5
func (*Blynk) DigitalRead ¶
func (*Blynk) DisableLogo ¶ added in v0.0.4
func (*Blynk) Disconnect ¶
func (*Blynk) Processing ¶
func (g *Blynk) Processing()
func (*Blynk) VirtualRead ¶
type BlynkCommand ¶
type BlynkCommand byte
const ( BLYNK_CMD_RESPONSE BlynkCommand = 0 BLYNK_CMD_LOGIN BlynkCommand = 2 BLYNK_CMD_PING BlynkCommand = 6 BLYNK_CMD_TWEET BlynkCommand = 12 BLYNK_CMD_EMAIL BlynkCommand = 13 BLYNK_CMD_NOTIFY BlynkCommand = 14 BLYNK_CMD_HARDWARE_SYNC BlynkCommand = 16 BLYNK_CMD_INTERNAL BlynkCommand = 17 BLYNK_CMD_HARDWARE BlynkCommand = 20 BLYNK_CMD_HW_LOGIN BlynkCommand = 29 )
type BlynkHead ¶
type BlynkHead struct { Command BlynkCommand MessageId uint16 Length uint16 }
type BlynkMessage ¶ added in v0.0.5
func (*BlynkMessage) GetBytes ¶ added in v0.0.5
func (b *BlynkMessage) GetBytes() []byte
type BlynkRespose ¶
type BlynkRespose struct { Command BlynkCommand MessageId uint16 Status uint16 Values []string }
Click to show internal directories.
Click to hide internal directories.