hybridgroup.gobot/platforms/sphero/sprkplus/sprkplus_driver.go

23 lines
423 B
Go

package sprkplus
import (
"gobot.io/x/gobot"
"gobot.io/x/gobot/platforms/ble"
"gobot.io/x/gobot/platforms/sphero/ollie"
)
// Driver represents a Sphero SPRK+
type SPRKPlusDriver struct {
*ollie.Driver
}
// NewDriver creates a Driver for a Sphero SPRK+
func NewDriver(a ble.BLEConnector) *SPRKPlusDriver {
d := ollie.NewDriver(a)
d.SetName(gobot.DefaultName("SPRKPlus"))
return &SPRKPlusDriver{
Driver: d,
}
}