code: func (b *IOPinDriver) AnalogRead(pin string) (val int, err error) {
  	p, err := validatedPin(pin)
  	if err != nil {
  		return
  	}
  
  	b.ensureAnalog(p)
  	b.ensureInput(p)
  
  	pins := b.ReadAllPinData()
  	return int(pins[p].value), nil
  }
docs: // AnalogRead reads from a pin