Go Down

Topic: Trouble with "blink" program (Read 438 times) previous topic - next topic


Hello, follks, I'm new here.  Please pardon this newbie question.  :smiley-mr-green:

Board: ATMegaLite (self-soldered)
Arduino board (from the board menu): Arduino Nano w/ ATMega328
Connection: D7 --> 220 Ohm resistor --> LED --> GRND [picture included]
Code: Arduino's "blink" example.

This is my first time running an arduino application, and so far, it's not easy.  I have the setup as described above: a 220 Ohm resistor connected to pin D7 (corresponding to Arduino Uno's pin 13) with the circuit ending at ground.  I have all this mounted on a breadboard.  When I upload the program, nothing happens.  Since I figured I had the wrong pin, I decided to modify the program to the following:

Code: [Select]

void loop() {
  Serial.print("Turning on LED. ");
  pinMode(led, OUTPUT);
  digitalWrite(led, HIGH);
  delay (1000);

...in hopes that I would eventually turn on the right pin.  However, I got to pin 44 (starting form pin 1) without the LED turning on.

I know that this isn't a firmware problem since I'm able to run this program and at least get console output.

Attached is a picture of my board setup.  In a bit I'll be using a multimeter to see what I can figure out though voltage.

Also, a disclaimer: I'm not a hardware buff, so I'm inadvertently learning hardware at the same time as Arduino.   :~

Thanks to all in advance for helping a newbie!  :)

Tom Carpenter

Try connecting the wire to +5v instead of one of the arduino I/O pins to check the LED works.


Are you sure that cathode goes to ground and anode to resistor?
Sometimes this happens...


Oh, sorry, figured it out.  I tried using an other LED.  As luck would have it, the LED was bad, I guess.  I have a blue LED blinking now!  :)

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131