gobot.io/x/gobot/v2@v2.1.0/platforms/sphero/bb8/bb8_driver.go (about)

     1  package bb8
     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 BB-8
    10  type BB8Driver struct {
    11  	*ollie.Driver
    12  }
    13  
    14  // NewDriver creates a Driver for a Sphero BB-8
    15  func NewDriver(a ble.BLEConnector) *BB8Driver {
    16  	d := ollie.NewDriver(a)
    17  	d.SetName(gobot.DefaultName("BB8"))
    18  
    19  	return &BB8Driver{
    20  		Driver: d,
    21  	}
    22  }