mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-05-14 19:29:32 +08:00
22 lines
360 B
Go
22 lines
360 B
Go
package bb8
|
|
|
|
import (
|
|
"gobot.io/x/gobot/platforms/ble"
|
|
"gobot.io/x/gobot/platforms/sphero/ollie"
|
|
)
|
|
|
|
// Driver represents a Sphero BB-8
|
|
type BB8Driver struct {
|
|
*ollie.Driver
|
|
}
|
|
|
|
// NewDriver creates a Driver for a Sphero BB-8
|
|
func NewDriver(a *ble.ClientAdaptor) *BB8Driver {
|
|
d := ollie.NewDriver(a)
|
|
d.SetName("BB-8")
|
|
|
|
return &BB8Driver{
|
|
Driver: d,
|
|
}
|
|
}
|