puredark:
I am super new to Arduino and electronic projects so please bear with me on my noobie question
How can I tell if my Arduino board is outputting data through the correct pin? Would a multimeter be the way to check? Reason being, I am trying to run LEDs in my project and nothing is happening. I was thinking the LEDs were all burned out but when I plug them in, they all blink but then they turn off and nothing happens from there. I am just trying to run the adafruit led test sketch.
Also (here is where my noob shows) if the Arduino is plugged into my PC via USB, will the sketch on the Arduino still run automatically or do I need to power the Arduino through another power source to get the sketch to run?
Thanks!
First of all, hopefully you know that the LED should be current limited with a resistor before connecting it to an Arduino pin. A value of 220 ohms is a good value... connect it like this:
[b]
Arduino pin <--- 220 Ohm <--- LED <--- GND[/b]
When the pin is turned on (that is, "[b]pinMode (pin, OUTPUT); digitalWrite (pin, HIGH);[/b]"
The LED should light. Using "[b]digitalWrite (pin, LOW);[/b]" should turn it off.
You can also use a voltmeter to determine if the port/pin is working (if you suspect the LED is bad). Simply measure the voltage between GND and the pin. A "low" will be around 0 volts (but could be 0.5 to 0.8 or so), while a "high" will read around 4.3 to 5.0 volts.
Note that you do not need any resistor to use the voltmeter.
For your second question, the USB port will power the Arduino. You can also power it with an external power supply (a 9 volt battery connected to the barrel jack power connector, (plus to the center pin and minus to the shell) will work. Since the Arduino has a built in voltage regulator (transforming the 9 volts to the 5 volts Arduino needs), realize that the regulator needs a minimum input differential in order to work. That is, for 5 volts OUTPUT, the regulator needs at least 2 volts more than 5 in order to work. So, 7 volts is around the minimum, and 9 is even better.
You can actually put in as much as 35 volts DC into the external power jack, but since the regulator "skims off" the needed 5 volts and throws the excess away as heat, 35 volts input would make the regulator overheat in seconds. That's why I suggested 9 volts. 9 is enough to make the regulator work, without being SO high that the regulator burns up throwing the rest away.
Note that the Arduino has an automatic power switch-over circuit on board. If you provide external power AND also connect to USB, the Arduino will run using the external power. If external power is removed (or not used), it switches over to using USB power. The switch over is automatic. You can even repeatedly apply and remove external power and the Arduino will switch back and forth seamlessly, using USB power when needed.
Hope this helps.