user405: I am using the A0 port on my Arduino Uno to read the voltage output from an LM35 temperature sensor.  I observed that the reading fluctuates a lot if I leave the remaining analog input ports A1 to A5 floating. Would floating analog inputs affect the accuracy of readings on input ports connected to some signals.

user30441: Even if setting the unused pins to OUTPUT/LOW consumes a little bit less power than INPUT with PULLUP enabled, i guess the second option is more save.
To quote somebody else:

If you accidentally touch a hot wire to an output set low you short-circuit your processor and frie it. If you accidentally touch a ground wire to an output set high you short-circuit your processor and frie it. If you accidentally touch either wire to an input with pull-up you won't even notice.


user407: Any floating pin will act as an antenna, and may interfere with values around it, this is one of the major disadvantages of using analog.
To get the most accurate readings with minimal amount of interference, you can pull all unused inputs to ground.
The accuracy will not change, as the accuracy is determined by the sensor itself. However it will reduce the amount of noise / interference, which will give you more accurate readings.
These pull to grounds can be accomplished by configuring the unused analog pins as digital outputs, and setting them low.
pinMode(A1, OUTPUT);
digitalWrite(A1, LOW);


405: <p>I am using the A0 port on my Arduino Uno to read the voltage output from an LM35 temperature sensor.  I observed that the reading fluctuates a lot if I leave the remaining analog input ports A1 to A5 floating. Would floating analog inputs affect the accuracy of readings on input ports connected to some signals.</p>
 30441: <p>Even if setting the unused pins to OUTPUT/LOW consumes a little bit less power than INPUT with PULLUP enabled, i guess the second option is more save.</p>

<p>To quote somebody else:</p>

<blockquote>
  <p>If you accidentally touch a hot wire to an output set low you short-circuit your processor and frie it. If you accidentally touch a ground wire to an output set high you short-circuit your processor and frie it. If you accidentally touch either wire to an input with pull-up you won't even notice.</p>
</blockquote>
 407: <p>Any floating pin will act as an antenna, and may interfere with values around it, this is one of the major disadvantages of using analog.</p>

<p>To get the most accurate readings with minimal amount of interference, you can pull all unused inputs to ground.</p>

<p>The accuracy will not change, as the accuracy is determined by the sensor itself. However it will reduce the amount of noise / interference, which will give you more accurate readings.</p>

<p>These pull to grounds can be accomplished by configuring the unused analog pins as digital outputs, and setting them low.</p>

<pre><code>pinMode(A1, OUTPUT);
digitalWrite(A1, LOW);
</code></pre>
