![Picture](/uploads/4/5/9/5/45950535/4753813.png?309)
Tutorial Steps:
1. You will need 11 wires, one push button, one potentiometer, one RGB LED, one Arduino board, and 4 30 Ohm resistors (type does not matter as long as they match.).
2. Put a jumper wire into the 5V pin on the Arduino board and the other end in the far negative (-) hole, closest to the bottom right (see picture).
3. Put a jumper wire into the GND pin on the Arduino board and the other end in the far positive (+) hole, closest to the bottom right (see picture).
4. Put a jumper wire into the A0 pin on the Arduino board and the other end into e7.
5. Put a jumper wire into pin 11 on the Arduino board and the other end into g28.
6. Put a jumper wire into pin 10 on the Arduino board and the other end into g27.
7. Put a jumper wire into pin 9 on the Arduino board and the other end into g25.
8. Put a jumper wire into pin 2 on the Arduino board and the other end into h16.
9. Put a jumper wire into a negative hole on the far right column (Shown in picture) and the other end into h14.
10. Put a jumper wire into a negative (-) hole on the far right column (Shown in picture) and the other end into e6.
11. Put a jumper wire into a positive (+) hole on the far right column (Shown in picture) and the other end into e8.
12. Put a jumper wire into a positive (+) hole on the far right column (Shown in picture) and the other end into e26.
13. Plug a resistor into a negative (-) hole on the far right column (Shown in picture) and the other end into j16.
14. Plug a resistor into f25 and the other end into e25.
15. Plug a resistor into f27 and the other end into e27.
16. Plug a resistor into f28 and the other end into e28.
Push button
17. Place a push button in where the leads reach d14, d16, g14, g16.
Potentiometer
18. Place a potentiometer into the breadboard where it plugs into a6, a7, a8.
RGB LED
19. Place the RGB LED into the breadboard into a25, a26, a27, a28.
Man, that was boring.
Troubleshooting Tips:
(AKA: Ways it could go terribly wrong. Like the fourth Indiana Jones movie, but worse.)
-Make sure all the wires, resistors, potentiometers, RGB LEDs, and push buttons are plugged in correctly.
-Make sure the RBG LEG is not burned out.
-If the RGB LED does not light up try switching out the resistors for ones with a lighter Ohm resistance.
- Check the code to make sure it matches up with the wiring.
-Don't forget the Arduino board all together.
Code:
Const int RED_PIN = 9;
Const int GREEN_PIN = 10;
Const int BLUE_PIN = 11;
const int BUTTON = 2;
const int POTENT = A0;
int buttonState = 0;
int val = 0;
void setup ()
{
pinMode (BUTTON, INPUT);
pinMode (RED_PIN, OUTPUT);
pinMode (BLUE_PIN, OUTPUT);
pinMode (GREEN_PIN, OUTPUT);
}
void loop() {
buttonState = digitalRead (Button);
if (buttonState == High)
{
digitalWrite (GREEN_PIN, HIGH);
digitalWrite (RED_PIN, HIGH);
digitalWrite (BLUE_PIN, LOW);
}
else
{
digitalWrite (GREEN_PIN, HIGH);
digitalWrite (RED_PIN, HIGH);
digitalWrite (BLUE_PIN, HIGH);
}
val = analogRead (POTENT); }
SCHEMATIC
What a majestic thing that is, eh?
Source Code
We Need to to look up the schematic symbols for buttons and potentiometers. We found this information at http://arduino.cc/en/tutorial/button and at http://www.arduino.cc/en/tutorial/potentiometer.
We also received information from Mr. Westhafer on the schematic symbol for RGB LEDs and how to organize them. Find his blackboard here? http://blackboard.wcpss.net/webapps/portal/frameset.jsp?tab_tab_group_id=_2_1&url=%2Fwebapps%2Fblackboard%2Fexecute%2Flauncher%3Ftype%3DCourse%26id%3D_15887_1%26url%3D
Don't think he has a twitter but if he does many shout-outs to him.
Code was received from www.Arduino.cc
1. You will need 11 wires, one push button, one potentiometer, one RGB LED, one Arduino board, and 4 30 Ohm resistors (type does not matter as long as they match.).
2. Put a jumper wire into the 5V pin on the Arduino board and the other end in the far negative (-) hole, closest to the bottom right (see picture).
3. Put a jumper wire into the GND pin on the Arduino board and the other end in the far positive (+) hole, closest to the bottom right (see picture).
4. Put a jumper wire into the A0 pin on the Arduino board and the other end into e7.
5. Put a jumper wire into pin 11 on the Arduino board and the other end into g28.
6. Put a jumper wire into pin 10 on the Arduino board and the other end into g27.
7. Put a jumper wire into pin 9 on the Arduino board and the other end into g25.
8. Put a jumper wire into pin 2 on the Arduino board and the other end into h16.
9. Put a jumper wire into a negative hole on the far right column (Shown in picture) and the other end into h14.
10. Put a jumper wire into a negative (-) hole on the far right column (Shown in picture) and the other end into e6.
11. Put a jumper wire into a positive (+) hole on the far right column (Shown in picture) and the other end into e8.
12. Put a jumper wire into a positive (+) hole on the far right column (Shown in picture) and the other end into e26.
13. Plug a resistor into a negative (-) hole on the far right column (Shown in picture) and the other end into j16.
14. Plug a resistor into f25 and the other end into e25.
15. Plug a resistor into f27 and the other end into e27.
16. Plug a resistor into f28 and the other end into e28.
Push button
17. Place a push button in where the leads reach d14, d16, g14, g16.
Potentiometer
18. Place a potentiometer into the breadboard where it plugs into a6, a7, a8.
RGB LED
19. Place the RGB LED into the breadboard into a25, a26, a27, a28.
Man, that was boring.
Troubleshooting Tips:
(AKA: Ways it could go terribly wrong. Like the fourth Indiana Jones movie, but worse.)
-Make sure all the wires, resistors, potentiometers, RGB LEDs, and push buttons are plugged in correctly.
-Make sure the RBG LEG is not burned out.
-If the RGB LED does not light up try switching out the resistors for ones with a lighter Ohm resistance.
- Check the code to make sure it matches up with the wiring.
-Don't forget the Arduino board all together.
Code:
Const int RED_PIN = 9;
Const int GREEN_PIN = 10;
Const int BLUE_PIN = 11;
const int BUTTON = 2;
const int POTENT = A0;
int buttonState = 0;
int val = 0;
void setup ()
{
pinMode (BUTTON, INPUT);
pinMode (RED_PIN, OUTPUT);
pinMode (BLUE_PIN, OUTPUT);
pinMode (GREEN_PIN, OUTPUT);
}
void loop() {
buttonState = digitalRead (Button);
if (buttonState == High)
{
digitalWrite (GREEN_PIN, HIGH);
digitalWrite (RED_PIN, HIGH);
digitalWrite (BLUE_PIN, LOW);
}
else
{
digitalWrite (GREEN_PIN, HIGH);
digitalWrite (RED_PIN, HIGH);
digitalWrite (BLUE_PIN, HIGH);
}
val = analogRead (POTENT); }
SCHEMATIC
What a majestic thing that is, eh?
Source Code
We Need to to look up the schematic symbols for buttons and potentiometers. We found this information at http://arduino.cc/en/tutorial/button and at http://www.arduino.cc/en/tutorial/potentiometer.
We also received information from Mr. Westhafer on the schematic symbol for RGB LEDs and how to organize them. Find his blackboard here? http://blackboard.wcpss.net/webapps/portal/frameset.jsp?tab_tab_group_id=_2_1&url=%2Fwebapps%2Fblackboard%2Fexecute%2Flauncher%3Ftype%3DCourse%26id%3D_15887_1%26url%3D
Don't think he has a twitter but if he does many shout-outs to him.
Code was received from www.Arduino.cc