1

I am worried that my Arduino is fried from a previous attempt at connecting a servo to it. To test my concerns, I changed the circuit to see if Arduino could even power a simple LED:

Code:

int led = 13;

void setup() {
    pinMode(led, OUTPUT);  
}

void loop() {
    digitalWrite(led, HIGH);
    delay(4000);
    digitalWrite(led, LOW);
    delay(4000);
}

Wiring:

enter image description here

In that pic, the Arduino is connected to a 9V battery. When I test the purple connections with my multimeter, the power bounces between ~5V and a weird 1.65V value every four seconds. I assume thats power being applied to the output pin in keeping with my code.

However, the LED does not light up. Any ideas as to what could be going wrong or how I could troubleshoot?

  • 1
    Have you tried putting the led the other way around? Led's do have polarity, so they won't lit up when they're put in the other way around. And also, are you sure the LED is working? – Paul Jun 16 '15 at 10:24
  • LEDs have a longer and shorter lead. The longer one is positive. The way your diagram is drawn, it looks like you have it in backwards. – Nick Gammon Jul 16 '15 at 7:00
1

As noted in the previous answer, being able to upload a new sketch indicates an Arduino is ok in general – in particular has a functioning CPU – but of course that does not test all features. For example, individual inputs and outputs can be damaged.

You can easily change your sketch so that it drives some range of outputs, as shown below. Thereafter, try moving the red wire (that now connects on 13) to some other of the outputs in the selected range.

enum { LedLo=2, LedHi=20}; // Set lo and hi limits of range

void setup() {
  for (int led=LedLo; i <= LedHi; ++i)
    pinMode (led, OUTPUT);
}

void loop() {
  for (int led=LedLo; i <= LedHi; ++i)
    digitalWrite(led, HIGH);
  delay(4000);
  for (int led=LedLo; i <= LedHi; ++i)
    digitalWrite(led, LOW);
  delay(4000);
}
0

If the LED 'ON' is lit, the board has 3.3v power. Does the LED 'L' blink? It is also on pin 13, the one your sketch controls. If so, perhaps your breadboard circuit is likely at fault. Do you have a multimeter? Does the voltage on whichever pin # your sketch controls change as you would expect it to? If both are correct, then if you recompile your sketch to use a different pin #, and adjust your connections to match, does your breadboard LED light then?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.