Connection:
using USB cable to connect from arduni to computer.
Testing:
I have loaded examples from arduino ide, such as blink.ino, and I can see the LED blinking.
Question:
Supply arduino with external 12V adapter, disconnect the USB cable, the LED stopped. How to make it work without the USB cable?
My external power is good for sure. Power indicator is on.
If I hook the usb cable back, the led starts working again.
I think when we upload code using arduino ide through the usb cable, a HEX file is generated and stored somewhere in the computer. The arduino board then pull down the hex file from computer to control led. Am I correct?
So, we need to burn the hex file to the arduino chip for the board to run itself, but how?
When you uploaded the blink sketch from the IDE it burned the program into the arduino in it's flash memory. It doesn't lose the program because it's unpowered. You simply are not providing power properly somehow using your external power source. Fix your power problem and led-13 will blink once again if it's the last program you uploaded.
You are right. My bad!!! It works now. I don't know why it didn't work that way.
We are uploading (program) our code using arduino ide through usb port. We now want to send out the HEX file to someone and let him/her burn to the arduino chip. For my understanding, we can use AVRISP programmer and software AVR Studio, and again. using USB port to do. Am I right? If so, steps to do? Could you please advise?
mparduino:
You are right. My bad!!! It works now. I don't know why it didn't work that way.
We are uploading (program) our code using arduino ide through usb port. We now want to send out the HEX file to someone and let him/her burn to the arduino chip. For my understanding, we can use AVRISP programmer and software AVR Studio, and again. using USB port to do. Am I right? If so, steps to do? Could you please advise?
Not impossible but a little difficult in that the IDE stores the .hex file in a temp directory that can be difficult to locate. Why don't you just send them the sketch text file?
mparduino:
I am not software guy. What is sketch text file? Not HEX file?
A sketch is the source program you create in the arduino IDE, or one of the IDE example files you select from the main menu. This is a simple text file that is of type .ino and can be easily cut and pasted and sent to anyone.