user28546: Has anyone successfully used the AREF pin on MKR1000?
I'm trying to use an EXTERNAL voltage reference (I need 1.5V instead of the default 5V) with: 
analogReference(EXTERNAL)

But when I compile I receive the following error message:

MKR_001:161: error: invalid conversion from 'int' to 'eAnalogReference {aka _eAnalogReference}' [-fpermissive] 

In the documentation (for analogReference) I found the following:

DEFAULT: the default analog reference of 5 volts (on 5V Arduino boards) or 3.3 volts (on 3.3V Arduino boards)
  INTERNAL: an built-in reference, equal to 1.1 volts on the ATmega168 or ATmega328 and 2.56 volts on the ATmega8 (not available on the Arduino Mega)
  INTERNAL1V1: a built-in 1.1V reference (Arduino Mega only)
  INTERNAL2V56: a built-in 2.56V reference (Arduino Mega only)
  EXTERNAL: the voltage applied to the AREF pin (0 to 5V only) is used as the reference.  

Thanks,
Corrado

user10394: The compiler error 
MKR_001:161: error: invalid conversion from 'int' to 'eAnalogReference {aka _eAnalogReference}' [-fpermissive] 

Is actually really simple once you understand what it means.
analogReference(EXTERNAL);

The function analogReference takes an integer as a parameter, but you are passing it EXTERNAL which is an enumeration.  Its probably an enumeration that uses integers for its values, but to the compiler there is a difference.  
If you want to disable the warning then you can use the -fpermissive flag on the compile command line, this is not a good idea because it invalidates the "type-safeness" of the language for the whole program.  Instead it is better to address them on a case by case basis and just cast EXTERNAL to an int.
analogReference((int)EXTERNAL);


user46734: In fact, the documentation suggests that for SAMD boards (MKR1000 is based on Zero) a different enumeration should be used where each value is prefixed with AR_ so for example you should use analogReference(AR_EXTERNAL);.

28546: <p>Has anyone successfully used the AREF pin on <a href="https://www.arduino.cc/en/Guide/MKR1000" rel="nofollow noreferrer">MKR1000</a>?</p>

<p>I'm trying to use an EXTERNAL voltage reference (I need 1.5V instead of the default 5V) with: </p>

<pre><code>analogReference(EXTERNAL)
</code></pre>

<p>But when I compile I receive the following error message:</p>

<blockquote>
  <p>MKR_001:161: error: invalid conversion from 'int' to 'eAnalogReference {aka _eAnalogReference}' [-fpermissive] </p>
</blockquote>

<p>In the documentation (for analogReference) I found the following:</p>

<blockquote>
  <p>DEFAULT: the default analog reference of 5 volts (on 5V Arduino boards) or 3.3 volts (on 3.3V Arduino boards)<br>
  INTERNAL: an built-in reference, equal to 1.1 volts on the ATmega168 or ATmega328 and 2.56 volts on the ATmega8 (not available on the Arduino Mega)<br>
  INTERNAL1V1: a built-in 1.1V reference (Arduino Mega only)<br>
  INTERNAL2V56: a built-in 2.56V reference (Arduino Mega only)<br>
  EXTERNAL: the voltage applied to the AREF pin (0 to 5V only) is used as the reference.  </p>
</blockquote>

<p>Thanks,
Corrado</p>
 10394: <p>The compiler error </p>

<pre><code>MKR_001:161: error: invalid conversion from 'int' to 'eAnalogReference {aka _eAnalogReference}' [-fpermissive] 
</code></pre>

<p>Is actually really simple once you understand what it means.</p>

<pre><code>analogReference(EXTERNAL);
</code></pre>

<p>The function <code>analogReference</code> takes an integer as a parameter, but you are passing it <code>EXTERNAL</code> which is an enumeration.  Its probably an enumeration that uses integers for its values, but to the compiler there is a difference.  </p>

<p>If you want to disable the warning then you can use the <code>-fpermissive</code> flag on the compile command line, this is not a good idea because it invalidates the "type-safeness" of the language for the whole program.  Instead it is better to address them on a case by case basis and just cast EXTERNAL to an int.</p>

<pre><code>analogReference((int)EXTERNAL);
</code></pre>
 46734: <p>In fact, the <a href="https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/" rel="nofollow noreferrer">documentation</a> suggests that for SAMD boards (MKR1000 is based on Zero) a different enumeration should be used where each value is prefixed with <code>AR_</code> so for example you should use <code>analogReference(AR_EXTERNAL);</code>.</p>
