Go Down

Topic: Micro + led (Read 578 times) previous topic - next topic



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?


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


Thank you it's finally working!


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: [Select]
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); 

// 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?


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


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

Go Up