code: func (f *Adaptor) AnalogRead(pin string) (val int, err error) {
  	p, err := strconv.Atoi(pin)
  	if err != nil {
  		return
  	}
  
  	p = f.digitalPin(p)
  
  	if f.Board.Pins()[p].Mode != client.Analog {
  		if err = f.Board.SetPinMode(p, client.Analog); err != nil {
  			return
  		}
  
  		if err = f.Board.ReportAnalog(p, 1); err != nil {
  			return
  		}
  		<-time.After(10 * time.Millisecond)
  	}
  
  	return f.Board.Pins()[p].Value, nil
  }
docs: // AnalogRead retrieves value from analog pin.
  // Returns -1 if the response from the board has timed out