Electronics:
Breadboard-
I learned that the breadbox has different settings of power and depending on where you connect the wires or cords or other connecting devices is how much power you get. Also with the breadbox you cannot connect the wires or cords to the two spots exactly next to each other because the left side is positive and the right side has a negative connection. I learned that like water, the power on the breadbox goes down. I also learned that the sides of the breadboard are called the rails, which is where you plug in the wires into the components on the rails.
Circuits-
We used a circuit in making our LEDS light up because our source of power was the battery connected to the arduino, the conductors were the wires, and we used a resistor, and the led all allowed these items in a circuit to turn into light in the led. You can short circuit something by using the wrong resistor and it can lead to the led burning out.
Arduino:
Arduino Components-
We learned the function of the different buttons and lights on the arduino such as the reset button and where to find out how much power it has and if it is on and many other different devices, and when we practiced using the arduino, we were able to see the power light and the light lighting up in green that is labeled on and blue which is labeled 13, which if both of them are lit I know the power is on. I also learned that there are different types of power on the arduinos to put the wires into such as digital power and analog and depending on the command you want the LED to follow is where you plug in the wires, such as when blinking, LED component is in digital power. The wires also go into components depending on whether they are "hot" or ground which are components on the Arduino. Also there is a usb port on the arduino and a place to plug in a cord that could possibly connected to a battery or computer.
Arduino Acting As a Battery:
Setting up Arduino as a Battery to power to an LED Workflow-
1. make sure your arduino can turn on, therefore checking the lights labeled on, which should light up green, and 13, which should light up blue
2. use red to represent hot and the black wires represent ground
3. I put the first wire on the power 5v component and on 12 on the rail of the breadbox on the left or positive side.
4. I put the other red wire at 9 on the left rail and 10 in the center of the breadbox.
5. I put the first black wire on gnu power, meaning ground, and 14 on the rail on the right side.
6. I put the second black wire at 15 on the rail on the right side and 17 in the center.
7. I placed the led at components 10 and 13 in the center of the breadboard.
9. The led has polarity and so the direction of the legs does matter, so the long leg is going up because it has a positive connection and the short leg is going down, because it has a negative connection on the breadboard.
9b. the last red wire is horizontal to the long leg of the led
10. I placed the resistor right behind last black wire and right behind the short leg of the led
11. In order to make the LEDs light up, with resistors and the importance or which resistor to use because if it is the wrong one, it could burn out the led or short circuit it.
12. plug in battery with cord and see if the LED lights up
12b. If it does not light up, troubleshoot it.
Troubleshooting Workflow-
(Troubleshooting is like fixing or looking for the problem if it is not working.)
1. We have to check the battery and connection with the battery and the cable or cord.
2. is the arduino on- do I see the blue and green flashing lights.
3. check the connection to the jumpers, are one of the wires connected to positive and one connected to the ground, are the wires or jumpers going from ground and hot
4. check the polarity of the led- is the long leg going positive and the short leg going negative
5. are the wires in the right components
6. are you using the correct resistor
7. Finally, if I have checked all of these things and the led is still not lighting up, then the led might have burned out, and you need a new one.
Blinking Lights with an Arduino:
Installing Arduino Software Workflow-
1. go to Arduino.cc (http://arduino.cc)
2. download version 1.7.10 to the macs
3. We had to delete the original Arduino program that was out of date.
4. open the Arduino program to make sure it is working and ready to program
Blinking LED Workflow-
1. we changed the red or hot wire to pin 13 power on the digital power side of our arduino instead of its original 5v power. This caused our led to start blinking on and off.
2. We used the basic blink example on the Arduino program that was already created for us in order to program the speed and delays of the blinking of the LED. The faster the led blinked and the less time there was in-between blinking after we downloaded the "command" or program onto the arduino.
3. I made sure the board setting was on Arduino Uno and the port was on the usb's serial number and not bluetooth on the Arduino Program.
4. I made sure pin number and other programming workflow corresponded with my arduino and code.
5. For the new code or flashing pattern for to the arduino, I had to verify or compile what speed and delays I wanted the led to be and then upload it.
6. I saved the default settings as blinkZoe, with no spaces and capitalization for what would be a space in words for saving different programs or documents on the program Arduino.
Blinking two LEDs Workflow-
1. In order to add another led, I had to use the component 13 in digital power and have that wire be connected to the left side of the rail on the breadbox because it is the positive side.
2. Then have a wire going from ground for the second led going to the right side of the breadbox because it is the negative side.
3. The second red wire has to go directly in front of the long leg of the led, and the second black wire has to go directly in front of the resistor leg that is closest to the bottom of the breadbox.
4. The resistor is directly behind the led with the leg closest to the top of the breadbox, right behind the short leg of the led.
5. After adding the new led to my original one light blinking arduino, I have to change the code on the computer to include the new led.
6. I had to use my blinkZoe and built a second blink program called blink2Zoe.
7. In order to change the code, I had to add a new pinMode called (13, OUTPUT);, and make sure there was a } at the end of the void setup.
8. I had to add to the void loop, now. I added directly underneath the original digitalWrite, a new digitalWrite called (13, LOW);. It had to be LOW because the original pin 6 was HIGH, and they need to be opposite commands for this code.
9. Then I set the delay to a simple (1000). I had to again set another digitalWrite under the first digitalWrite pin 6, called digitalWrite(13, HIGH);. Again, It was HIGH this time because pin 6 was set to LOW, and they have to be opposite for this particular code. I then finished with another simple delay(1000);.
10. After I pressed verify and then upload, I was able to see both LEDs flashing opposite of each other.
Troubleshooting Programing Workflow-
1. check the coding or programming that your specific arduino starts with identifying a variable named integer ledPin=(your pin #, like 13 or 6);.
1b. The variable is ledPin, and the variable is in words not letters.
1c. The pin number is same to component on arduino.
4. check for a semicolon after every line, in order to go to the next line of programming
2b.everything ends in semicolons
5. Then there is a void code, and void means either input or output. The code for void is void setup () {, and for our particular projects so far have been OUTPUT and always ends with a }.
6. If more than one LED, check that there is different pinModes for each component connecting to an LED.
6b. check to see if the void loop settings for the pins have opposite commands for HIGH or LOW.
7. make sure there is no extra letters or characters or anything besides your code
8. verify and upload your code
(Program Files on 9th Grade Engineering Design 1 Folder Section)
October 31, 2016- Today in engineering class, I set my arduino board to have potentially 8 blinking lights all at the same time or one after the other using codes. I put different color wires that represented the "hot" colors to show they were positive into the digital power components 2-10 and put the other end of the wires in the e rail of the breadboard, in front of the long leg of the leds or the leg going positive. The leds were placed on the d rail of the breadboard and were evenly spaced with one space in between them. There was a wire for every LED in order to have a positive for every LED. The black wire that represents ground was placed into the ground component in the power pins, and the other end of the wire was placed on the far left, highest place in the negative rail of the breadboard. Then I placed a 330 resistor so the LEDS would not burn out, behind the short leg of every LED on the a rail of the breadboard and placed the other end of the resistor two or three components down from the last resistor on the far left negative rail on the breadboard. Then once I plugged my arduino into the computer using a usb cord, all 8 LEDS lit up, and I will be able to start coding them to blink all at once or one after the other soon.
November 1, 2016- Today in engineering class, I used my arduino board with 8 LEDS already hooked up to the board, and relearned how to make two LEDs blink at once. First I had to identify what LEDs I wanted by identifying the LED's digital component. I had to identify my LEDs by writing in my code int ledPin = 2 and int ledPin2 = 3. I had to identify my integers with different names, so it would not replace what I had previously said was the integer for ledPin, so I labeled it ledPin2. I placed that information above void setup, before I started my code. Under void setup, I wrote my code as pinMode(ledPin, OUTPUT); then the next line pinMode(ledPin2, OUTPUT);. They both have to be OUTPUT, so the LEDs do not burn out and because that in the necessary function for this code. I made sure to put semicolons after each line of code and an end bracket at the end of my code. For void loop, I said digitalWrite(ledPin, HIGH);, and the next line I said digitalWrite(ledPin2, HIGH); and the delay(1000);. This allows both of my LEDs to turn on at the same time and have a delay of 1000 milliseconds before the next command. Then, I wrote digitalWrite(ledPin, LOW);, and the next line I wrote digitalWrite(ledPin2, LOW);, and then delay(1000);. This allows both of my LEDs to turn off after they have initially turned on, and have them turn off for 1000 milliseconds. I made sure to have semicolons after every line and an end bracket at the end of void loop. This allowed me to code my LEDs to turn off and on continuously and renamed this code Blink2LightsZoe. I will eventually expand this to 8 LEDs at a time.
November 2, 2016- Today in engineering class, I worked on programming my arduino with 8 LEDs in order to have all LEDs to light up at the same time and turn off at the same time. I modified my code for 2 LEDs blinking together by adding and identifying more integers for LEDs components 4-9 on top of the integers for LEDs components 2 and 3 that were already identified. I started, after identifying 2 and 3 as integers for LED components, with int ledPin3 = 4 and ended with int ledPin8= 9, and filled in all the other components for LEDs in-between. Then I created a void setup for all of the integers that started with pinMode(ledPin, OUTPUT);, and ended with pinMode(ledPin8, OUTPUT);. All of the pins had the control of OUTPUT because that was specific to this code, and also to prevent the LEDs from burning out. Every line had a semicolon after it and the last line had an end bracket to end void setup. For void loop, I originally put digitalWrite(ledPin, HIGH); through all of the pin numbers ending with digitalWrite(ledPin8, HIGH);, in order to make all of the LEDs turn on at the same time and wrote a delay(1000), so the LEDs would stay on for 1000 milliseconds until the second command. The second command was digitalWrite(ledPin, LOW) for every pin number up until ledPin8, and I added a delay(1000), so the LEDs would all turn on and off at the same time once I verified and uploaded the code. I renamed this code Blinking8LightsZoe.
November 3, 2016- Today in engineering class, we worked with creating a loop in order to make programming easier and more efficient. For void setup we used the code- for (int counter = 2; counter < 10; counter ++). This means that the code will apply for LED components from 2 to less than 10. Counter ++ means the value or the pin number will be increased by one every time, so in this specie code one pin will follow the written code, then the second, the the third, and so on. If I wanted it to be increased by more then one, then I would have to state it; such as if I wanted it increased by 2 every time, I would write at the end of my integer code counter++2. Then under this, under void setup, I wrote pinMode(counter, OUTPUT);. This means that the code will apply to all of the pin numbers that is written in the original code, or counter, which in this case is 2 up until 9. This makes it a lot easier than writing each individual pin number out and OUTPUT because all of the pins are going to require the OUTPUT command in this code. Then under void loop, I repeated what the integer value was, also known as what is the counter. Then I would write digitalWrite(counter, HIGH); then delay(1000); then on the next line digitalWrite(counter, LOW); and then delay(1000);. I have to put brackets at the end of my final codes in void setup and loop, and also put semicolons after every command. Once I verify and download this code, each LED blinks on and off once and then the next one starts, until the end of the LEDs and then it starts over. I renamed this code BlinkLoop8LightsZoe. Now I am trying to make a loop for 8 LEDs to turn on and off at the same time. It has not been easy, but using we are required to use the same counter as in this code, and it is very hard when each of the LEDs is programmed to do one thing one at a time, but I will keep working and eventually create this code, and it will become a more efficient process.