Documentation ¶
Index ¶
- Constants
- type FirmataAdaptor
- func (f *FirmataAdaptor) AnalogRead(pin string) int
- func (f *FirmataAdaptor) AnalogWrite(pin string, level byte)
- func (f *FirmataAdaptor) Connect() bool
- func (f *FirmataAdaptor) DigitalRead(pin string) int
- func (f *FirmataAdaptor) DigitalWrite(pin string, level byte)
- func (f *FirmataAdaptor) Disconnect() bool
- func (f *FirmataAdaptor) Finalize() bool
- func (f *FirmataAdaptor) I2cRead(size uint) []byte
- func (f *FirmataAdaptor) I2cStart(address byte)
- func (f *FirmataAdaptor) I2cWrite(data []byte)
- func (f *FirmataAdaptor) InitServo()
- func (f *FirmataAdaptor) PwmWrite(pin string, level byte)
- func (f *FirmataAdaptor) ServoWrite(pin string, angle byte)
Constants ¶
View Source
const ( Open byte = 1 Close byte = 0 Input byte = 0x00 Output byte = 0x01 Analog byte = 0x02 PWM byte = 0x03 Servo byte = 0x04 Low byte = 0 High byte = 1 ReportVersion byte = 0xF9 SystemReset byte = 0xFF DigitalMessage byte = 0x90 DigitalMessageRangeStart byte = 0x90 DigitalMessageRangeEnd byte = 0x9F AnalogMessage byte = 0xE0 AnalogMessageRangeStart byte = 0xE0 AnalogMessageRangeEnd byte = 0xEF ReportAnalog byte = 0xC0 ReportDigital byte = 0xD0 PinMode byte = 0xF4 StartSysex byte = 0xF0 EndSysex byte = 0xF7 CapabilityQuery byte = 0x6B CapabilityResponse byte = 0x6C PinStateQuery byte = 0x6D PinStateResponse byte = 0x6E AnalogMappingQuery byte = 0x69 AnalogMappingResponse byte = 0x6A StringData byte = 0x71 I2CRequest byte = 0x76 I2CReply byte = 0x77 I2CConfig byte = 0x78 FirmwareQuery byte = 0x79 I2CModeWrite byte = 0x00 I2CModeRead byte = 0x01 I2CmodeContinuousRead byte = 0x02 I2CModeStopReading byte = 0x03 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FirmataAdaptor ¶
func NewFirmataAdaptor ¶
func NewFirmataAdaptor(name, port string) *FirmataAdaptor
func (*FirmataAdaptor) AnalogRead ¶
func (f *FirmataAdaptor) AnalogRead(pin string) int
NOTE pins are numbered A0-A5, which translate to digital pins 14-19
func (*FirmataAdaptor) AnalogWrite ¶
func (f *FirmataAdaptor) AnalogWrite(pin string, level byte)
func (*FirmataAdaptor) Connect ¶
func (f *FirmataAdaptor) Connect() bool
func (*FirmataAdaptor) DigitalRead ¶
func (f *FirmataAdaptor) DigitalRead(pin string) int
func (*FirmataAdaptor) DigitalWrite ¶
func (f *FirmataAdaptor) DigitalWrite(pin string, level byte)
func (*FirmataAdaptor) Disconnect ¶
func (f *FirmataAdaptor) Disconnect() bool
func (*FirmataAdaptor) Finalize ¶
func (f *FirmataAdaptor) Finalize() bool
func (*FirmataAdaptor) I2cRead ¶
func (f *FirmataAdaptor) I2cRead(size uint) []byte
func (*FirmataAdaptor) I2cStart ¶
func (f *FirmataAdaptor) I2cStart(address byte)
func (*FirmataAdaptor) I2cWrite ¶
func (f *FirmataAdaptor) I2cWrite(data []byte)
func (*FirmataAdaptor) InitServo ¶
func (f *FirmataAdaptor) InitServo()
func (*FirmataAdaptor) PwmWrite ¶
func (f *FirmataAdaptor) PwmWrite(pin string, level byte)
func (*FirmataAdaptor) ServoWrite ¶
func (f *FirmataAdaptor) ServoWrite(pin string, angle byte)
Click to show internal directories.
Click to hide internal directories.