[RESOLU] modification à la volée de analogReference()

La mesure analogique se fait toujours en comparaison de la référence analogique. Cependant il semble qu'il faille attendre un peu et attention si tu utilises AREF :

[quote author=Datasheet Atmega 328P]If the user has a fixed voltage source connected to the AREF pin, the user may not use the other
reference voltage options in the application, as they will be shorted to the external voltage. If no
external voltage is applied to the AREF pin, the user may switch between AVCC and 1.1V as reference
selection. The first ADC conversion result after switching reference voltage source may
be inaccurate, and the user is advised to discard this result.[/quote]