How to run Arduino without computer

Hi, I'm new to Arduino and I have a pretty simple question.

After I download my code onto my Arduino, can I diconnect the computer and will it still run? Every time I disconnect my computer while my Arduino is running, it immediately stops. How can I solve this problem?

Thanks!

How you power your Arduino?
Did you use serial code?

So far I've only been running my Arduino while it was connected to the computer, so the power has been coming from the computer. And no, I don't use serial code.

If you need to run Arduino without computer than you need external power supply, like battery or AC to 9VDC adapter.

http://playground.arduino.cc/Learning/WhatAdapter

If you power up an Arduino it will start running the last sketch that was loaded into it. It saves the program in its non volition memory.

1 Like

sach:
So far I've only been running my Arduino while it was connected to the computer, so the power has been coming from the computer.

Well then, no power, no Arduino operation!

sach:
After I download my code onto my Arduino, can I diconnect the computer and will it still run? Every time I disconnect my computer while my Arduino is running, it immediately stops. How can I solve this problem?

You have to provide electric power to the Arduino board.

Two possibilities are:

  1. Use a 5V USB charger and connect using an USB cable to the Arduino board.

  2. Use a 7.5V to 9V DC power adapter and connect with external power jack.

Or 5V DC adapter connected to 5v/Gnd on the power header.