func (b *SpheroOllieDriver) SetTXPower(level int) (err error) {
	buf := []byte{byte(level)}
	err = b.adaptor().WriteCharacteristic(SpheroBLEService, TXPowerCharacteristic, buf)
	if err != nil {
		fmt.Println("SetTXLevel error:", err)
		return err
	}
	return
}
Sets transmit level
package ble
import (
	"bytes"
	"fmt"
	"time"
	"github.com/hybridgroup/gobot"
)
var _ gobot.Driver = (*SpheroOllieDriver)(nil)
type SpheroOllieDriver struct {
	name          string
	connection    gobot.Connection
	seq           uint8
	packetChannel chan *packet
	gobot.Eventer
}
const (
	SpheroBLEService    = "22bb746f2bb075542d6f726568705327"
	RobotControlService = "22bb746f2ba075542d6f726568705327"
	WakeCharacteristic    = "22bb746f2bbf75542d6f726568705327"
	TXPowerCharacteristic = "22bb746f2bb275542d6f726568705327"
	AntiDosCharacteristic = "22bb746f2bbd75542d6f726568705327"
	CommandsCharacteristic = "22bb746f2ba175542d6f726568705327"
	ResponseCharacteristic = "22bb746f2ba675542d6f726568705327"
	SensorData = "sensordata"
	Collision  = "collision"
	Error      = "error"
)
type packet struct {
	header   []uint8
	body     []uint8
	checksum uint8
}
func NewSpheroOllieDriver(a *BLEClientAdaptor, name string) *SpheroOllieDriver {
	n := &SpheroOllieDriver{
		name:          name,
		connection:    a,
		Eventer:       gobot.NewEventer(),
		packetChannel: make(chan *packet, 1024),
	}
	return n
}
func (b *SpheroOllieDriver) Connection() gobot.Connection { return b.connection }
func (b *SpheroOllieDriver) Name() string                 { return b.name }
func (b *SpheroOllieDriver) adaptor() *BLEClientAdaptor {
	return b.Connection().(*BLEClientAdaptor)
}
func (s *SpheroOllieDriver) Start() (errs []error) {
	s.Init()
	go func() {
		for {
			packet := <-s.packetChannel
			err := s.write(packet)
			if err != nil {
				s.Publish(s.Event(Error), err)
			}
		}
	}()
	return
}
func (b *SpheroOllieDriver) Halt() (errs []error) {
	b.Sleep()
	time.Sleep(750 * time.Microsecond)
	return
}
func (b *SpheroOllieDriver) Init() (err error) {
	b.AntiDOSOff()
	b.SetTXPower(7)
	b.Wake()
	b.adaptor().Subscribe(RobotControlService, ResponseCharacteristic, b.HandleResponses)
	return
}
func (b *SpheroOllieDriver) AntiDOSOff() (err error) {
	str := "011i3"
	buf := &bytes.Buffer{}
	buf.WriteString(str)
	err = b.adaptor().WriteCharacteristic(SpheroBLEService, AntiDosCharacteristic, buf.Bytes())
	if err != nil {
		fmt.Println("AntiDOSOff error:", err)
		return err
	}
	return
}
func (b *SpheroOllieDriver) Wake() (err error) {
	buf := []byte{0x01}
	err = b.adaptor().WriteCharacteristic(SpheroBLEService, WakeCharacteristic, buf)
	if err != nil {
		fmt.Println("Wake error:", err)
		return err
	}
	return
}