Cant get the thing working

I got an arduino nano today. Ive got it mounted on my breadboard and connected via usb. The software talks to the chip--at least it uploads. I modified the Blink codefile to use another pin to see if it worked, and it doesn't. The software tells me that it's uploaded. I even tried changing the pin that it uses, but it didn't work. Am I doing something wrong? The code is below

/* Blink without Delay * * Turns on and off a light emitting diode(LED) connected to a digital * pin, without using the delay() function. This means that other code * can run at the same time without being interrupted by the LED code. * */

int ledPin = 7; // LED connected to digital pin 4

int value = LOW; // previous value of the LED long previousMillis = 0; // will store last time LED was updated long interval = 1000; // interval at which to blink (milliseconds)

void setup() { pinMode(ledPin, OUTPUT); // sets the digital pin as output }

void loop() { // here is where you'd put code that needs to be running all the time.

// check to see if it's time to blink the LED; that is, is the difference // between the current time and last time we blinked the LED bigger than // the interval at which we want to blink the LED. if (millis() - previousMillis > interval) { previousMillis = millis(); // remember the last time we blinked the LED

// if the LED is off turn it on and vice-versa. if (value == LOW) value = HIGH; else value = LOW;

digitalWrite(ledPin, value); } }

Forgot to mention that its being powered by usb and the only thing on the breadboard is a wire going from pin 14 to the LED's positive lead, and a wire from the negative lead to a ground. The arduino is just as it came out of the box.

Just to be sure: Your code has pin 7 as the LED, and you stated that you have the wire on pin 14. You should also have a resistor on the led to keep from burning it out.

First I used 14 then I thought maybe the pin was bad so I tried 7 instead... I'm not worried about the LED, its taken more than this =) I just need to get this working, and I dont seem to be able to do that.. I was using a 9v battery - terminal as a ground, but the battery seems to be dead. Could that be causing this? What else would work well as a ground?

You will want to use the ground pin on the nano via the breadboard.

Well, that doesn't seem to work either. I plugged into both gnd pins with no results. is the pin numbering for the nano the same as the others?

Well, nothing I have tried is working.. and I've tried everything I can think of. This is stupid, my propeller is easier to interface with.

I'm not worried about the LED, its taken more than this =)

did you use a resistor? It is possible that the LED can draw more current than the pin is designed to handle (40ma) and this may have damaged the controller chip.

I did not, the thing said it was unnecessary since pin 13 normally has a resistor or something. when I upload the code the way it is when you load blink (defaulting to pin 13), the L light (orange one) on the nano blinks according to the code.

If the LED on the board blinks, that's a good sign.

Try plugging the positive end of the LED into pin 13. Connect the other end to a resister, which then goes to ground. If it doesn't work, try turning the LED around.

If that doesn't work, remove the battery from the Nano, and try putting the LED & resistor straight to the battery to make sure the LED still works.

Good luck!

Well, I feel like an idiot... I tried ~10 different LED's, apparently every one of them is dead... I used a different bulb and it works perfectly. Are LED's overly sensitive to static? I've never had this happen before. Thanks for all your help.

I think it may be your habit of using LEDs without a resistor to limit current. According to Wikipedia, most LEDs are rated 30-60mA - so at 40mA, you're right at the limit. Miniture LEDs are rated at only 1-20mA, so the Arduino could destroy those rather quickly.

If you still have the package for the LEDs, you might check max current rating.