code: func (b *Adaptor) DigitalPin(pin string, dir string) (sysfsPin sysfs.DigitalPinner, err error) {
  	b.mutex.Lock()
  	defer b.mutex.Unlock()
  
  	i, err := b.translatePin(pin)
  	if err != nil {
  		return
  	}
  	if b.digitalPins[i] == nil {
  		b.digitalPins[i] = sysfs.NewDigitalPin(i)
  		if err = muxPin(pin, "gpio"); err != nil {
  			return
  		}
  
  		err := b.digitalPins[i].Export()
  		if err != nil {
  			return nil, err
  		}
  	}
  	if err = b.digitalPins[i].Direction(dir); err != nil {
  		return
  	}
  	return b.digitalPins[i], nil
  }
docs: // DigitalPin retrieves digital pin value by name