Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command byte
Command indicates the command that should be executed on the board to be provisioned.
type Serial ¶
type Serial struct {
// contains filtered or unexported fields
}
Serial is a wrapper of serial port interface that features specific functions to send provisioning commands through the serial port to an arduino device.
func NewSerial ¶
func NewSerial() *Serial
NewSerial instantiate and returns a Serial instance. The Serial Connect method should be called before using its send/receive functions.
func (*Serial) Close ¶
Close should be used when the Serial connection isn't used anymore. After that, Serial could Connect again to any port.
func (*Serial) SendReceive ¶
SendReceive allows to send a provisioning command to a connected arduino device. Then, it waits for a response from the device and, if any, returns it. If no response is received after 2 seconds, an error is returned.