user53053: I haven't tried so don't know if it works or not. So I got a 6v battery AA, is it possible to run my arduino uno which already got a code in it if I plug + pin to vin and - to GND? Without its USB?

user2881: The UNO recommends at least 7 Volts on the Vin. 6 Volt is the absolute minimum. As the AA batteries drain, the voltage will be below this 6 Volts very quickly.
I tend to use a 3xAA battery holder, giving around 4.5Volt, and connect that straight to the Vcc pin (bypassing the voltage regulator). This works just fine in most cases.

user2967: Get a 5 battery holder and put 5 alkaline batteries into it. (5 battery holders are sometimes used to provide 6 volts from ni-cat or NiMh batteries, which provide ≈1.2V.
5 alkaline AA batteries would give you ≈7.5V, which gives you more "wiggle room" for the voltage regulator.
EDIT:
As Gerben pointed out in their comment, 5 AA batteries will drop below the minium voltage input to the Arduino's voltage regulator well before they are depleted. A 6 battery holder would let you use more of the total battery capacity. (At the cost of wasting the excess voltage as heat.)

53053: <p>I haven't tried so don't know if it works or not. So I got a 6v battery AA, is it possible to run my arduino uno which already got a code in it if I plug + pin to vin and - to GND? Without its USB?</p>
 2881: <p>The UNO recommends at least 7 Volts on the Vin. 6 Volt is the absolute minimum. As the AA batteries drain, the voltage will be below this 6 Volts very quickly.</p>

<p>I tend to use a 3xAA battery holder, giving around 4.5Volt, and connect that straight to the Vcc pin (bypassing the voltage regulator). This works just fine in most cases.</p>
 2967: <p>Get a 5 battery holder and put 5 alkaline batteries into it. (5 battery holders are sometimes used to provide 6 volts from ni-cat or NiMh batteries, which provide ≈1.2V.</p>
<p>5 alkaline AA batteries would give you ≈7.5V, which gives you more &quot;wiggle room&quot; for the voltage regulator.</p>
<h2>EDIT:</h2>
<p>As Gerben pointed out in their comment, 5 AA batteries will drop below the minium voltage input to the Arduino's voltage regulator well before they are depleted. A 6 battery holder would let you use more of the total battery capacity. (At the cost of wasting the excess voltage as heat.)</p>
