code: func (d *GrovePiDriver) readDigital(pin byte) (val int, err error) {
  	buf := []byte{CommandReadDigital, pin, 0, 0}
  	_, err = d.connection.Write(buf)
  	if err != nil {
  		return
  	}
  
  	time.Sleep(2 * time.Millisecond)
  
  	data := make([]byte, 2)
  	_, err = d.connection.Read(data)
  	if err != nil || data[0] != CommandReadDigital {
  		return 0, err
  	}
  
  	return int(data[1]), err
  }
docs: // readDigital reads digitally from the GrovePi.