Professional Documents
Culture Documents
TESTING ARDUINO
- Materials Needed: LED Bulb, resistor (220 ohm), arduino board, breadboard, jumper wires (2x)
- LED Bulb = lighting (can receive 1.5V of current on average) [each color has different voltage]
{Red-Green-Blue [ascending] needed voltage}
= since the bulb can receive 1.5V and arduino gives 5V, resistor is needed so that the
bulb will not be busteda
Steps:
1. Attach Bulb in the breadboard, long pin should be attached in the positive whereas the short pin
should be attached on any column letter on the breadboard
2. Attach one end of the resistor on any points vertical to the negative pin of the bulb and the other end
should be attached on a new column letter
3. Attach a wire on the 5V pin on arduino board. This will be the positive charge. The other end should
be attached on the same row where the positive pin of the bulb is attached.
4. Attach a wire on the GND pin on arduino board. This will be the negative charge. The other end
should be attached on the same column where the other end of the resistor is attached.
LIGHTING AN RGB BULB
- Materials Needed: 1 Red bulb, 1 Green bulb, 1 blue bulb, {1 common cathode (-) RGB Bulb} Resistor
(x3), Wires (x9), arduino board, breadboard
Steps:
int red=5;
int blue=6;
int green=7;
void setup() {
// put your setup code here, to run once:
pinMode(red,OUTPUT);
pinMode(blue,OUTPUT);
pinMode(green,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(red, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100);
digitalWrite(red, LOW); // turn the LED on (HIGH is the voltage level)
delay(100);
digitalWrite(blue, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100);
digitalWrite(blue, LOW); // turn the LED on (HIGH is the voltage level)
delay(100);
digitalWrite(green, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100);
digitalWrite(green, LOW); // turn the LED on (HIGH is the voltage level)
}