Description
The purpose of this project is to learn how programming and breadboards work. We created circuits that hooked up from the computer to the Arduino board (red board), which was screwed in next to the breadboard. We hooked up wires and LEDs to so we could start programming them. We connected the red board and the breadboard with a negative and positive wire, and connected a wire and a resistor to each LED. The USB had to be plugged in so we could verify and upload the circuit to the Arduino program. We went in to the code and commented actions for the LEDs. This means we went in and deleted the slashes (//) from each action. As you can see, each action follows two slashes.
//oneAfterAnotherLoop(); // Same as oneAfterAnotherNoLoop,
// but with much less typing
//oneOnAtATime(); // Turn on one LED at a time,
// scrolling down the line
//pingPong(); // Light the LEDs middle to the edges
//marquee(); // Chase lights like you see on signs
//randomLED(); // Blink LEDs randomly
}
pingPong means the LEDs will all play once a one direction and then "bounce" off the end and go backwards in the other direction.
marquee means the LEDs will light up like a sign, with multiple lights (every other light) will travel down the line.
randomLED is exactly as it's implied. The code picks random LEDs to light up.
Now the important thing is that you can change the speed of how fast the LEDs will light up.
int index;
int delayTime = 100; // milliseconds to pause between LEDs
// make this smaller for faster switching
int delayTime is how fast the LEDs switch between lights. You can change it to just about any number. The number is how many milliseconds before the next light.
The purpose of this project is to learn how programming and breadboards work. We created circuits that hooked up from the computer to the Arduino board (red board), which was screwed in next to the breadboard. We hooked up wires and LEDs to so we could start programming them. We connected the red board and the breadboard with a negative and positive wire, and connected a wire and a resistor to each LED. The USB had to be plugged in so we could verify and upload the circuit to the Arduino program. We went in to the code and commented actions for the LEDs. This means we went in and deleted the slashes (//) from each action. As you can see, each action follows two slashes.
//oneAfterAnotherLoop(); // Same as oneAfterAnotherNoLoop,
// but with much less typing
//oneOnAtATime(); // Turn on one LED at a time,
// scrolling down the line
//pingPong(); // Light the LEDs middle to the edges
//marquee(); // Chase lights like you see on signs
//randomLED(); // Blink LEDs randomly
}
pingPong means the LEDs will all play once a one direction and then "bounce" off the end and go backwards in the other direction.
marquee means the LEDs will light up like a sign, with multiple lights (every other light) will travel down the line.
randomLED is exactly as it's implied. The code picks random LEDs to light up.
Now the important thing is that you can change the speed of how fast the LEDs will light up.
int index;
int delayTime = 100; // milliseconds to pause between LEDs
// make this smaller for faster switching
int delayTime is how fast the LEDs switch between lights. You can change it to just about any number. The number is how many milliseconds before the next light.