Documentation ¶
Index ¶
- type Collision
- type SpheroAdaptor
- type SpheroDriver
- func (s *SpheroDriver) GetRGB() []uint8
- func (s *SpheroDriver) Halt() bool
- func (s *SpheroDriver) Init() bool
- func (s *SpheroDriver) Roll(speed uint8, heading uint16)
- func (s *SpheroDriver) SetBackLED(level uint8)
- func (s *SpheroDriver) SetHeading(heading uint16)
- func (s *SpheroDriver) SetRGB(r uint8, g uint8, b uint8)
- func (s *SpheroDriver) SetStabilization(on bool)
- func (s *SpheroDriver) Start() bool
- func (s *SpheroDriver) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collision ¶
type Collision struct {
// Normalized impact components (direction of the collision event):
X, Y, Z int16
// Thresholds exceeded by X (1h) and/or Y (2h) axis (bitmask):
Axis byte
// Power that cross threshold Xt + Xs:
XMagnitude, YMagnitude int16
// Sphero's speed when impact detected:
Speed uint8
// Millisecond timer
Timestamp uint32
}
type SpheroAdaptor ¶
func NewSpheroAdaptor ¶
func NewSpheroAdaptor(name string, port string) *SpheroAdaptor
func (*SpheroAdaptor) Connect ¶
func (a *SpheroAdaptor) Connect() bool
func (*SpheroAdaptor) Disconnect ¶
func (a *SpheroAdaptor) Disconnect() bool
func (*SpheroAdaptor) Finalize ¶
func (a *SpheroAdaptor) Finalize() bool
func (*SpheroAdaptor) Reconnect ¶
func (a *SpheroAdaptor) Reconnect() bool
type SpheroDriver ¶
func NewSpheroDriver ¶
func NewSpheroDriver(a *SpheroAdaptor, name string) *SpheroDriver
func (*SpheroDriver) GetRGB ¶
func (s *SpheroDriver) GetRGB() []uint8
func (*SpheroDriver) Halt ¶
func (s *SpheroDriver) Halt() bool
func (*SpheroDriver) Init ¶
func (s *SpheroDriver) Init() bool
func (*SpheroDriver) Roll ¶
func (s *SpheroDriver) Roll(speed uint8, heading uint16)
func (*SpheroDriver) SetBackLED ¶
func (s *SpheroDriver) SetBackLED(level uint8)
func (*SpheroDriver) SetHeading ¶
func (s *SpheroDriver) SetHeading(heading uint16)
func (*SpheroDriver) SetStabilization ¶
func (s *SpheroDriver) SetStabilization(on bool)
func (*SpheroDriver) Start ¶
func (s *SpheroDriver) Start() bool
func (*SpheroDriver) Stop ¶
func (s *SpheroDriver) Stop()
Click to show internal directories.
Click to hide internal directories.