gobot.io/x/gobot/v2@v2.1.0/platforms/sphero/sprkplus/sprkplus_driver.go (about)

     1  package sprkplus
     2  
     3  import (
     4  	"gobot.io/x/gobot/v2"
     5  	"gobot.io/x/gobot/v2/platforms/ble"
     6  	"gobot.io/x/gobot/v2/platforms/sphero/ollie"
     7  )
     8  
     9  // Driver represents a Sphero SPRK+
    10  type SPRKPlusDriver struct {
    11  	*ollie.Driver
    12  }
    13  
    14  // NewDriver creates a Driver for a Sphero SPRK+
    15  func NewDriver(a ble.BLEConnector) *SPRKPlusDriver {
    16  	d := ollie.NewDriver(a)
    17  	d.SetName(gobot.DefaultName("SPRKPlus"))
    18  
    19  	return &SPRKPlusDriver{
    20  		Driver: d,
    21  	}
    22  }