func (l *LedDriver) State() bool {
	return l.high
}
State return true if the led is On and false if the led is Off
package gpio
import "github.com/hybridgroup/gobot"
var _ gobot.Driver = (*LedDriver)(nil)
type LedDriver struct {
	pin        string
	name       string
	connection DigitalWriter
	high       bool
	gobot.Commander
}
func NewLedDriver(a DigitalWriter, name string, pin string) *LedDriver {
	l := &LedDriver{
		name:       name,
		pin:        pin,
		connection: a,
		high:       false,
		Commander:  gobot.NewCommander(),
	}
	l.AddCommand("Brightness", func(params map[string]interface{}) interface{} {
		level := byte(params["level"].(float64))
		return l.Brightness(level)
	})
	l.AddCommand("Toggle", func(params map[string]interface{}) interface{} {
		return l.Toggle()
	})
	l.AddCommand("On", func(params map[string]interface{}) interface{} {
		return l.On()
	})
	l.AddCommand("Off", func(params map[string]interface{}) interface{} {
		return l.Off()
	})
	return l
}
func (l *LedDriver) Start() (errs []error) { return }
func (l *LedDriver) Halt() (errs []error) { return }
func (l *LedDriver) Name() string { return l.name }
func (l *LedDriver) Pin() string { return l.pin }
func (l *LedDriver) Connection() gobot.Connection {
	return l.connection.(gobot.Connection)
}