Light Show with 10 LEDs #4215

This is a discussion for the Light Show with 10 LEDs Experiment. Feel free to connect with the Learning Team here, or to discuss experiment tips, ask questions, leave comments or suggest experiment variations here.
24_PM

One word: FUN!
This was challenging and that is a great thing because when it works it is pretty awesome!

It was a challenge for me. It took a little while to get all the codes where they needed to be, and to make sure there was nothing extra or missing. Happy when I figured it out!

I’m showing my age here, but I am having a really hard time seeing the spaces on the breadboard. But I was successful with help from my younger eyed daughter!

1 Like

A magnifying glass with a stand can come in very handy with these small numbers for sure!

1 Like

Will be going to the store tomorrow!! I have bifocals and still can’t see them!! #old

1 Like

This was a fun activity. I first did it alone and then did it with one of my students. He got the kick out of it. He felt so good when all the lights blinked!

1 Like

I have half of the lights in and only one is blinking. What is going on? Also, it was not clear whether I was supposed to use the 10K ohm or 330 ohm resistors. Does it make a difference. I noticed the 10K made the light dimmer so I used the 330 ohm, but I still can’t get more than one light to light up.

1 Like

@kristi.fehr Hi Kristi! Maybe I can help…

It doesn’t matter which ohm resistors you use, they’ll perform the same function in this case!
It does make a difference which way you orient the LEDs in your breadboard. If they’re not lighting up, try reversing which wire is in which port and see if that helps.
I also noticed there was an issue in the code to run the program, as not all the LEDs were correctly referenced in the code: (if you notice, not all LEDs are identified).
int led1 = 13;
int led2 = 12;
int led3 = 11;
int led4 = 10;
int led5 = 7;
int led6 = 6;
int led7 = 5;
int led8 = 4;
int led9 = 3;
int led10 = 2;
int pindelay = 100;

So change that to include ALL the LEDs and make sure they have their own number

int led1 = 13;
int led2 = 12;
int led3 = 11;
int led4 = 10;
int led5 = 9;
int led6 = 8;
int led7 = 7;
int led8 = 6;
int led9 = 5;
int led10 = 4;
int led11 = 3;
int led12 = 2;
int pindelay = 100;

Remember, you’ll have to scroll down through all the code to make sure each LED is referenced correctly, then it will work. I’ll copy and paste the full code here, but it’s a lot!

#include <Arduino.h>
#include <Wire.h>
#include <ArdusatSDK.h>

int led1 = 13;
int led2 = 12;
int led3 = 11;
int led4 = 10;
int led5 = 9;
int led6 = 8;
int led7 = 7;
int led8 = 6;
int led9 = 5;
int led10 = 4;
int led11 = 3;
int led12 = 2;
int pindelay = 100;

void setup(void)
{

pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
pinMode(led5, OUTPUT);
pinMode(led6, OUTPUT);
pinMode(led7, OUTPUT);
pinMode(led8, OUTPUT);
pinMode(led9, OUTPUT);
pinMode(led10, OUTPUT);
pinMode(led11, OUTPUT);
pinMode(led12, OUTPUT);

}

void loop(void)
{
digitalWrite(led1, HIGH);
delay(pindelay);

digitalWrite(led2, HIGH);
delay(pindelay);

digitalWrite(led3, HIGH);
delay(pindelay);

digitalWrite(led4, HIGH);
delay(pindelay);

digitalWrite(led5, HIGH);
delay(pindelay);

digitalWrite(led6, HIGH);
delay(pindelay);

digitalWrite(led7, HIGH);
delay(pindelay);

digitalWrite(led8, HIGH);
delay(pindelay);

digitalWrite(led9, HIGH);
delay(pindelay);

digitalWrite(led10, HIGH);
delay(pindelay);

digitalWrite(led11, HIGH);
delay(pindelay);

digitalWrite(led12, HIGH);
delay(pindelay);

digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
digitalWrite(led3, LOW);
digitalWrite(led4, LOW);
digitalWrite(led5, LOW);
digitalWrite(led6, LOW);
digitalWrite(led7, LOW);
digitalWrite(led8, LOW);
digitalWrite(led9, LOW);
digitalWrite(led10, LOW);
digitalWrite(led11, LOW);
digitalWrite(led12, LOW);

}

Photo attached so you can see my board set up, too.

I hope some of that was helpful!

1 Like

Yes! Thank you so much for taking the time to provide those steps!

1 Like