Pages: [1]   Go Down
Author Topic: Trouble with "blink" program  (Read 259 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
void loop() {
  Serial.print("Turning on LED. ");
  Serial.println(++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.   smiley-confuse

Thanks to all in advance for helping a newbie!  smiley


* arduino-small.jpg (877.73 KB, 1296x972 - viewed 14 times.)
Logged

Leeds, UK
Offline Offline
Edison Member
*
Karma: 80
Posts: 1726
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

~Tom~

0
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!  smiley
Thanks.
Logged

Pages: [1]   Go Up
Jump to: