Pages: [1]   Go Down
Author Topic: Micro + led  (Read 414 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

This is very simple but for some reason I can't get an led connection to work with the micro. I normally use the uno but for some reason working off the board with the Arduino is confusing me.

What's wrong with this picture?


* microled (185.51 KB, 1080x720 - viewed 25 times.)
Logged

Pottstown, PA
Offline Offline
Sr. Member
****
Karma: 5
Posts: 318
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It seems that you are confused as to how pins on breadboards are internally connected. The rows of pins on one side of the vertical separating slots are not connected to the row of pins on the other side of the slot. The red jumper is internally connected to the 6 pins on that row but to nothing else. Above that row, one end of the resistor is internally connected to the 6 pins in that row but nothing else, etc. The only rows of 6 pins that are connected to each other are the rows marked by the red and blue lines. - Scotty
Logged

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

Thank you it's finally working!
Logged

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

Well one led is working. I hooked up two more but they will only blink on pin 9, even when I changed the code to:

Code:
int led = 9;
int led1=10;
int led2= 5;

// the setup routine runs once when you press reset:
void setup() {               
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);   
 pinMode(led1, OUTPUT); 
pinMode(led2,OUTPUT); 
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);
 digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);
digitalWrite(led1, LOW);
digitalWrite(led2, LOW); // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

I think my setup is correct?


* microled1 (204.28 KB, 1080x720 - viewed 23 times.)
Logged

Pottstown, PA
Offline Offline
Sr. Member
****
Karma: 5
Posts: 318
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's difficult to tell because some of the connection points are slightly out of focus or they are blocked by components or jumper wires. A schematic would be much better. It does look like your resistors are shorted out since it looks like the two ends of the resistors are connected to the same row. If that's the case (again, can't really tell from the photo) then you are drawing way too much current from a pin which will damage your Micro. - Scotty
Logged

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

Oh god, I didn't know that about the resistors. Thank you for your help the lights are all blinking
Logged

Pages: [1]   Go Up
Jump to: