Documentation ¶
Index ¶
- type AnalogReader
- type AnalogSensorDriver
- type AnalogWriter
- type ButtonDriver
- type DigitalReader
- type DigitalWriter
- type DirectPin
- type DirectPinDriver
- func (d *DirectPinDriver) AnalogRead() int
- func (d *DirectPinDriver) AnalogWrite(level byte)
- func (d *DirectPinDriver) DigitalRead() int
- func (d *DirectPinDriver) DigitalWrite(level byte)
- func (d *DirectPinDriver) Halt() bool
- func (d *DirectPinDriver) Init() bool
- func (d *DirectPinDriver) PwmWrite(level byte)
- func (d *DirectPinDriver) ServoWrite(level byte)
- func (d *DirectPinDriver) Start() bool
- type LedDriver
- type MakeyButtonDriver
- type MotorDriver
- func (m *MotorDriver) Backward(speed byte)
- func (m *MotorDriver) Direction(direction string)
- func (m *MotorDriver) Forward(speed byte)
- func (m *MotorDriver) Halt() bool
- func (m *MotorDriver) Init() bool
- func (m *MotorDriver) IsOff() bool
- func (m *MotorDriver) IsOn() bool
- func (m *MotorDriver) Max()
- func (m *MotorDriver) Min()
- func (m *MotorDriver) Off()
- func (m *MotorDriver) On()
- func (m *MotorDriver) Speed(value byte)
- func (m *MotorDriver) Start() bool
- func (m *MotorDriver) Toggle()
- type Pwm
- type PwmDigitalWriter
- type Servo
- type ServoDriver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalogReader ¶
type AnalogSensorDriver ¶
func NewAnalogSensorDriver ¶
func NewAnalogSensorDriver(a AnalogReader, name string, pin string) *AnalogSensorDriver
func (*AnalogSensorDriver) Halt ¶
func (a *AnalogSensorDriver) Halt() bool
func (*AnalogSensorDriver) Init ¶
func (a *AnalogSensorDriver) Init() bool
func (*AnalogSensorDriver) Read ¶
func (a *AnalogSensorDriver) Read() int
func (*AnalogSensorDriver) Start ¶
func (a *AnalogSensorDriver) Start() bool
type AnalogWriter ¶
type ButtonDriver ¶
func NewButtonDriver ¶
func NewButtonDriver(a DigitalReader, name string, pin string) *ButtonDriver
func (*ButtonDriver) Halt ¶
func (b *ButtonDriver) Halt() bool
func (*ButtonDriver) Init ¶
func (b *ButtonDriver) Init() bool
func (*ButtonDriver) Start ¶
func (b *ButtonDriver) Start() bool
type DigitalReader ¶
type DigitalWriter ¶
type DirectPin ¶
type DirectPin interface { DigitalWriter DigitalReader Pwm Servo AnalogWriter AnalogReader }
type DirectPinDriver ¶
func NewDirectPinDriver ¶
func NewDirectPinDriver(a DirectPin, name string, pin string) *DirectPinDriver
func (*DirectPinDriver) AnalogRead ¶
func (d *DirectPinDriver) AnalogRead() int
func (*DirectPinDriver) AnalogWrite ¶
func (d *DirectPinDriver) AnalogWrite(level byte)
func (*DirectPinDriver) DigitalRead ¶
func (d *DirectPinDriver) DigitalRead() int
func (*DirectPinDriver) DigitalWrite ¶
func (d *DirectPinDriver) DigitalWrite(level byte)
func (*DirectPinDriver) Halt ¶
func (d *DirectPinDriver) Halt() bool
func (*DirectPinDriver) Init ¶
func (d *DirectPinDriver) Init() bool
func (*DirectPinDriver) PwmWrite ¶
func (d *DirectPinDriver) PwmWrite(level byte)
func (*DirectPinDriver) ServoWrite ¶
func (d *DirectPinDriver) ServoWrite(level byte)
func (*DirectPinDriver) Start ¶
func (d *DirectPinDriver) Start() bool
type LedDriver ¶
func NewLedDriver ¶
func NewLedDriver(a PwmDigitalWriter, name string, pin string) *LedDriver
func (*LedDriver) Brightness ¶
type MakeyButtonDriver ¶
type MakeyButtonDriver struct { gobot.Driver Active bool // contains filtered or unexported fields }
func NewMakeyButtonDriver ¶
func NewMakeyButtonDriver(a DigitalReader, name string, pin string) *MakeyButtonDriver
func (*MakeyButtonDriver) Halt ¶
func (m *MakeyButtonDriver) Halt() bool
func (*MakeyButtonDriver) Init ¶
func (m *MakeyButtonDriver) Init() bool
func (*MakeyButtonDriver) Start ¶
func (m *MakeyButtonDriver) Start() bool
type MotorDriver ¶
type MotorDriver struct { gobot.Driver SpeedPin string SwitchPin string DirectionPin string ForwardPin string BackwardPin string CurrentState byte CurrentSpeed byte CurrentMode string CurrentDirection string }
func NewMotorDriver ¶
func NewMotorDriver(a PwmDigitalWriter, name string, pin string) *MotorDriver
func (*MotorDriver) Backward ¶
func (m *MotorDriver) Backward(speed byte)
func (*MotorDriver) Direction ¶
func (m *MotorDriver) Direction(direction string)
func (*MotorDriver) Forward ¶
func (m *MotorDriver) Forward(speed byte)
func (*MotorDriver) Halt ¶
func (m *MotorDriver) Halt() bool
func (*MotorDriver) Init ¶
func (m *MotorDriver) Init() bool
func (*MotorDriver) IsOff ¶
func (m *MotorDriver) IsOff() bool
func (*MotorDriver) IsOn ¶
func (m *MotorDriver) IsOn() bool
func (*MotorDriver) Max ¶
func (m *MotorDriver) Max()
func (*MotorDriver) Min ¶
func (m *MotorDriver) Min()
func (*MotorDriver) Off ¶
func (m *MotorDriver) Off()
func (*MotorDriver) On ¶
func (m *MotorDriver) On()
func (*MotorDriver) Speed ¶
func (m *MotorDriver) Speed(value byte)
func (*MotorDriver) Start ¶
func (m *MotorDriver) Start() bool
func (*MotorDriver) Toggle ¶
func (m *MotorDriver) Toggle()
type PwmDigitalWriter ¶
type PwmDigitalWriter interface { DigitalWriter Pwm }
type ServoDriver ¶
func NewServoDriver ¶
func NewServoDriver(a Servo, name string, pin string) *ServoDriver
func (*ServoDriver) Center ¶
func (s *ServoDriver) Center()
func (*ServoDriver) Halt ¶
func (s *ServoDriver) Halt() bool
func (*ServoDriver) Init ¶
func (s *ServoDriver) Init() bool
func (*ServoDriver) InitServo ¶
func (s *ServoDriver) InitServo()
func (*ServoDriver) Max ¶
func (s *ServoDriver) Max()
func (*ServoDriver) Min ¶
func (s *ServoDriver) Min()
func (*ServoDriver) Move ¶
func (s *ServoDriver) Move(angle uint8)
func (*ServoDriver) Start ¶
func (s *ServoDriver) Start() bool
Click to show internal directories.
Click to hide internal directories.