code: func (g *Driver) DigitalRead(pin string) (value int, err error) {
  	var (
  		grovePin, grovePort Grove
  		stateCmd            byte
  	)
  	grovePin, grovePort, _, stateCmd, err = getGroveAddresses(pin)
  	if err != nil {
  		return value, err
  	}
  	err = g.SetGroveType(grovePort, CUSTOM)
  	if err != nil {
  		return value, err
  	}
  	time.Sleep(10 * time.Millisecond)
  	err = g.SetGroveMode(grovePin, GROVE_INPUT_DIGITAL)
  	if err != nil {
  		return value, err
  	}
  	time.Sleep(10 * time.Millisecond)
  	response, err := g.readBytes(goPiGo3Address, stateCmd, 6)
  	if err != nil {
  		return value, err
  	}
  	if err := g.responseValid(response); err != nil {
  		return value, err
  	}
  	if err := g.valueValid(response); err != nil {
  		return value, err
  	}
  	return int(response[5]), nil
  }
docs: // DigitalRead reads the 0/1 value from the given pin.