code: func (d *GrovePiDriver) DigitalRead(pin string) (val int, err error) {
  	pin = getPin(pin)
  
  	var pinNum int
  	pinNum, err = strconv.Atoi(pin)
  	if err != nil {
  		return
  	}
  
  	if dir, ok := d.digitalPins[pinNum]; !ok || dir != "input" {
  		d.PinMode(byte(pinNum), "input")
  		d.digitalPins[pinNum] = "input"
  	}
  
  	val, err = d.readDigital(byte(pinNum))
  
  	return
  }
docs: // DigitalRead performs a read on a digital pin.