Documentation ¶
Overview ¶
Package ollie contains the Gobot driver for the Sphero Ollie.
For more information refer to the Ollie README: https://gobot.io/x/gobot/blob/master/platforms/sphero/ollie/README.md
Index ¶
- Constants
- type Driver
- func (b *Driver) AntiDOSOff() (err error)
- func (b *Driver) Connection() gobot.Connection
- func (b *Driver) EnableStopOnDisconnect()
- func (b *Driver) Halt() (err error)
- func (b *Driver) HandleResponses(data []byte, e error)
- func (b *Driver) Init() (err error)
- func (b *Driver) Name() string
- func (b *Driver) Roll(speed uint8, heading uint16)
- func (b *Driver) SetName(n string)
- func (b *Driver) SetRGB(r uint8, g uint8, bl uint8)
- func (b *Driver) SetTXPower(level int) (err error)
- func (b *Driver) Sleep()
- func (b *Driver) Start() (err error)
- func (b *Driver) Stop()
- func (b *Driver) Wake() (err error)
Constants ¶
View Source
const ( // SpheroBLEService is the primary service ID SpheroBLEService = "22bb746f2bb075542d6f726568705327" // RobotControlService is the service ID for the Sphero command API RobotControlService = "22bb746f2ba075542d6f726568705327" // WakeCharacteristic characteristic ID WakeCharacteristic = "22bb746f2bbf75542d6f726568705327" // TXPowerCharacteristic characteristic ID TXPowerCharacteristic = "22bb746f2bb275542d6f726568705327" // AntiDosCharacteristic characteristic ID AntiDosCharacteristic = "22bb746f2bbd75542d6f726568705327" // CommandsCharacteristic characteristic ID CommandsCharacteristic = "22bb746f2ba175542d6f726568705327" // ResponseCharacteristic characteristic ID ResponseCharacteristic = "22bb746f2ba675542d6f726568705327" // SensorData event SensorData = "sensordata" // Collision event Collision = "collision" // Error event Error = "error" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
Driver is the Gobot driver for the Sphero Ollie robot
func NewDriver ¶
func NewDriver(a *ble.ClientAdaptor) *Driver
NewDriver creates a Driver for a Sphero Ollie
func (*Driver) AntiDOSOff ¶
AntiDOSOff turns off Anti-DOS code so we can control Ollie
func (*Driver) Connection ¶
func (b *Driver) Connection() gobot.Connection
Connection returns the connection to this Ollie
func (*Driver) EnableStopOnDisconnect ¶
func (b *Driver) EnableStopOnDisconnect()
EnableStopOnDisconnect auto-sends a Stop command after losing the connection
func (*Driver) HandleResponses ¶
HandleResponses handles responses returned from Ollie
func (*Driver) SetTXPower ¶
SetTXPower sets transmit level
Click to show internal directories.
Click to hide internal directories.