func (m *MotorDriver) On() (err error) {
	if m.isDigital() {
		err = m.changeState(1)
	} else {
		if m.CurrentSpeed == 0 {
			m.CurrentSpeed = 255
		}
		err = m.Speed(m.CurrentSpeed)
	}
	return
}
On turns the motor on or sets the motor to a maximum speed
package gpio
import (
	"github.com/hybridgroup/gobot"
)
type MotorDriver struct {
	name             string
	connection       DigitalWriter
	SpeedPin         string
	SwitchPin        string
	DirectionPin     string
	ForwardPin       string
	BackwardPin      string
	CurrentState     byte
	CurrentSpeed     byte
	CurrentMode      string
	CurrentDirection string
}
func NewMotorDriver(a DigitalWriter, name string, speedPin string) *MotorDriver {
	return &MotorDriver{
		name:             name,
		connection:       a,
		SpeedPin:         speedPin,
		CurrentState:     0,
		CurrentSpeed:     0,
		CurrentMode:      "digital",
		CurrentDirection: "forward",
	}
}
func (m *MotorDriver) Name() string { return m.name }
func (m *MotorDriver) Connection() gobot.Connection { return m.connection.(gobot.Connection) }
func (m *MotorDriver) Start() (errs []error) { return }
func (m *MotorDriver) Halt() (errs []error) { return }
func (m *MotorDriver) Off() (err error) {
	if m.isDigital() {
		err = m.changeState(0)
	} else {
		err = m.Speed(0)
	}
	return
}