code: func NewDirectPinDriver(a gobot.Connection, pin string) *DirectPinDriver {
  	d := &DirectPinDriver{
  		name:       gobot.DefaultName("DirectPin"),
  		connection: a,
  		pin:        pin,
  		Commander:  gobot.NewCommander(),
  	}
  
  	d.AddCommand("DigitalRead", func(params map[string]interface{}) interface{} {
  		val, err := d.DigitalRead()
  		return map[string]interface{}{"val": val, "err": err}
  	})
  	d.AddCommand("DigitalWrite", func(params map[string]interface{}) interface{} {
  		level, _ := strconv.Atoi(params["level"].(string))
  		return d.DigitalWrite(byte(level))
  	})
  	d.AddCommand("PwmWrite", func(params map[string]interface{}) interface{} {
  		level, _ := strconv.Atoi(params["level"].(string))
  		return d.PwmWrite(byte(level))
  	})
  	d.AddCommand("ServoWrite", func(params map[string]interface{}) interface{} {
  		level, _ := strconv.Atoi(params["level"].(string))
  		return d.ServoWrite(byte(level))
  	})
  
  	return d
  }
docs: // NewDirectPinDriver return a new DirectPinDriver given a Connection and pin.
  //
  // Adds the following API Commands:
  // 	"DigitalRead" - See DirectPinDriver.DigitalRead
  // 	"DigitalWrite" - See DirectPinDriver.DigitalWrite
  // 	"AnalogWrite" - See DirectPinDriver.AnalogWrite
  // 	"PwmWrite" - See DirectPinDriver.PwmWrite
  // 	"ServoWrite" - See DirectPinDriver.ServoWrite