code: func (m *MotorDriver) Direction(direction string) (err error) {
  	m.CurrentDirection = direction
  	if m.DirectionPin != "" {
  		var level byte
  		if direction == "forward" {
  			level = 1
  		} else {
  			level = 0
  		}
  		err = m.connection.DigitalWrite(m.DirectionPin, level)
  	} else {
  		var forwardLevel, backwardLevel byte
  		switch direction {
  		case "forward":
  			forwardLevel = 1
  			backwardLevel = 0
  		case "backward":
  			forwardLevel = 0
  			backwardLevel = 1
  		case "none":
  			forwardLevel = 0
  			backwardLevel = 0
  		}
  		err = m.connection.DigitalWrite(m.ForwardPin, forwardLevel)
  		if err != nil {
  			return
  		}
  		err = m.connection.DigitalWrite(m.BackwardPin, backwardLevel)
  		if err != nil {
  			return
  		}
  	}
  	return
  }
docs: // Direction sets the direction pin to the specified speed