In our robot art show project we had to create something that used computers and the arduino breadboard and coding. We first made circuits consisting of lights, wires, a battery, and resistor to learn the basics of the flow of electricity. We then had to complete a packet on breadboards, we used them to make a light blink, breadboards basically a small table that allows you to make a circuit in a compact area. Lastly we had to use the computer program arduino to create a code that will follow what we say, which was to make a lights blink when we press a button.
This was our final product for our robot art show, when you press the button the lights follow one another untill you let go. A circuit can only be in parallel or in series. In parallel both lights have the same brightness. But when in series the first light is the brightest. Current, current is the amount of flow through the battery. Resistance is the how much a resistor can hold back the flow of electricity. Voltage is the amount of energy in a circuit measured in volts. A breadboard is basically a placemat for creating circuits. Coding was the hardest part of this project, coding is what you used to make a light blink by pressing a button.
|
|
|
IThis project was very challenging and frustrating , but I learned so many new concepts. I feel like I did very well in work ethic, I was always willing to try things and make the circuits. I also did very well in cooperation, when I was stuck I would ask my partner for help we were able to accomplish all the circuits with each other. But didn't do so good in empathy because when I got frustrated I sometimes got mad at my partner. Also did poorly in leadership, I didn't find myself leading the group l, my partner Joell was the one who stepped. Over all this project was really fun and challenging, and I look forward to more programming in the future.
Below is the code for our project. |
//For our circuit we made a light chain that gets activated
//when you press the button down. If you hold the button the
// Light chain continues untill you let go of the button.
int ledPins[] = {3,4,5,6,7,8,9,10}; // chooses what pin the LED's go into
int button1Pin = 2; //lets you choose which pin the button goes into
void setup() // A setup function that run once the sketch starts
{
int index;
for(index = 0; index <= 7; index++)
{
pinMode(ledPins[index],OUTPUT); // states that leds are outputs
}
}
void loop()
{
if(digitalRead(button1Pin) == LOW){
oneAfterAnotherLoop(); } // chooses oneAfterAnotherLoop as designated light pattern
}
void oneAfterAnotherLoop() // Set up for light pattern
{
int index;
int delayTime = 100; // Delay time in millaseconds
for(index = 0; index <= 7; index++)
{
digitalWrite(ledPins[index], HIGH); // states is light is on
delay(delayTime);
}
for(index = 7; index >= 0; index--)
{
digitalWrite(ledPins[index], LOW); // states that light is off
delay(delayTime);
}
}
//when you press the button down. If you hold the button the
// Light chain continues untill you let go of the button.
int ledPins[] = {3,4,5,6,7,8,9,10}; // chooses what pin the LED's go into
int button1Pin = 2; //lets you choose which pin the button goes into
void setup() // A setup function that run once the sketch starts
{
int index;
for(index = 0; index <= 7; index++)
{
pinMode(ledPins[index],OUTPUT); // states that leds are outputs
}
}
void loop()
{
if(digitalRead(button1Pin) == LOW){
oneAfterAnotherLoop(); } // chooses oneAfterAnotherLoop as designated light pattern
}
void oneAfterAnotherLoop() // Set up for light pattern
{
int index;
int delayTime = 100; // Delay time in millaseconds
for(index = 0; index <= 7; index++)
{
digitalWrite(ledPins[index], HIGH); // states is light is on
delay(delayTime);
}
for(index = 7; index >= 0; index--)
{
digitalWrite(ledPins[index], LOW); // states that light is off
delay(delayTime);
}
}