0% found this document useful (0 votes)
114 views19 pages

RGB Module

This document discusses an RGB module lesson. It begins by stating the lesson's target outcomes, which are to determine RGB color combinations, recognize the three primary colors of light, and recall what an LED is. It then engages students by asking their favorite color. The explore section has students observe color mixing experiments. The explain section discusses how RGB modules use red, green, and blue LEDs to create colors by intensity control. Code examples are provided to produce different colors. Students are then asked to complete color mixing activities and questions.

Uploaded by

Lace Cabato
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views19 pages

RGB Module

This document discusses an RGB module lesson. It begins by stating the lesson's target outcomes, which are to determine RGB color combinations, recognize the three primary colors of light, and recall what an LED is. It then engages students by asking their favorite color. The explore section has students observe color mixing experiments. The explain section discusses how RGB modules use red, green, and blue LEDs to create colors by intensity control. Code examples are provided to produce different colors. Students are then asked to complete color mixing activities and questions.

Uploaded by

Lace Cabato
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

RGB Module

Module 1 Lesson 4
Lesson 4: RGB Module

Target Outcomes

Determine the code to produce color combinations with different


intensity using an RGB module;

Recognize the three primary colors of light; and

Recall the meaning of LED.


Lesson 4: RGB Module

Engage

What is your
favorite color?
Lesson 4: RGB Module

Engage
Lesson 4: RGB Module

Explore
Data Collection for Poking Fun at Color Mixing

Record your observations from the following experiments


in the table below.
1. Start by turning on only the red and green bulbs.
Position the viewer so the light from the two bulbs
overlaps on your wax paper screen. (You may need to
move closer to the light source.) What color do you see What color do you think you'll see when all three lights are turned on
in the area of overlap? and overlapping? Make a prediction before doing the experiment.
2. Turn off the green light and turn on the blue, leaving
the red still on. Now what color do you see in the area
of overlap?
3. Finally, turn off the red and turn the green back on.
What color do you see where the blue and green lights
overlap?
Lesson 4: RGB Module

Explain

RGB Module uses an RGB (Red,


Green, and Blue) LED to emit various
colors and effects in their projects.
RGB color space or RGB color system,
constructs all the colors from the
combination of the Red, Green and
Blue colors.
Lesson 4: RGB Module

Explain

The RGB LED can emit different


colors by mixing the 3 basic colors red,
green and blue. So it actually consists
of 3 separate LEDs red, green and blue
packed in a single case. That’s why it has
4 leads, one lead for each of the 3 colors
and one common cathode or anode depending of the RGB LED type.
Lesson 4: RGB Module

Explain

The three primary colors, red, green, and


blue, can be mixed and compose all kinds
of colors by brightness, so you can make
an RGB LED emit colorful light by controlling
the circuit.

The intensity of the light produced by each LED can be controlled by adjusting the
value of intensity for each color. By mixing or adjusting the intensity this primary colors of
light almost all colors can be produced.
Lesson 4: RGB Module

Arduino Review
digitalWrite()
Description
Write a HIGH or a LOW value to a digital pin.
If the pin has been configured as an OUTPUT with pinMode(), its voltage will be set to the corresponding value: 5V (or 3.3V on 3.3V
boards) for HIGH, 0V (ground) for LOW.
If the pin is configured as an INPUT, digitalWrite() will enable (HIGH) or disable (LOW) the internal pullup on the input pin. It is
recommended to set the pinMode() to INPUT_PULLUP to enable the internal pull-up resistor. See the Digital Pins tutorial for more
information.
If you do not set the pinMode() to OUTPUT, and connect an LED to a pin, when calling digitalWrite(HIGH), the LED may appear dim.
Without explicitly setting pinMode(), digitalWrite() will have enabled the internal pull-up resistor, which acts like a large current-limiting
resistor.
Syntax
digitalWrite(pin, value)
Parameters
pin: the Arduino pin number.
value: HIGH or LOW.
Lesson 4: RGB Module

Elaborate

Materials
Microcontroller USB Cable Jumper Wire
Breadboard 3 pc. 220 Ohms Resistors 1 pc. RGB Module

Procedure
1. Examine the RGB module prepared by your teacher.
2. Study the code that turns the RGB module light into RED.

Activity 1: Seven Color Display


1. Complete the table using your RGB module.
2. Determine the RGB codes that will produce other colors.
Lesson 4: RGB Module

Elaborate
RED
digitalWrite(RED_PIN, HIGH);
digitalWrite(GREEN_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
delay(1000);

GREEN BLUE
digitalWrite(RED_PIN, LOW); digitalWrite(RED_PIN, LOW);
digitalWrite(GREEN_PIN, HIGH); digitalWrite(GREEN_PIN, LOW);
digitalWrite(BLUE_PIN, LOW); digitalWrite(BLUE_PIN, HIGH);
delay(1000); delay(1000);
Lesson 4: RGB Module

Elaborate
YELLOW PURPLE
digitalWrite(RED_PIN, HIGH); digitalWrite(RED_PIN, HIGH);
digitalWrite(GREEN_PIN, HIGH); digitalWrite(GREEN_PIN, LOW);
digitalWrite(BLUE_PIN, LOW); digitalWrite(BLUE_PIN, HIGH);
delay(1000); delay(1000);

CYAN WHITE
digitalWrite(RED_PIN, LOW); digitalWrite(RED_PIN, HIGH);
digitalWrite(GREEN_PIN, HIGH); digitalWrite(GREEN_PIN, HIGH);
digitalWrite(BLUE_PIN, HIGH); digitalWrite(BLUE_PIN, HIGH);
delay(1000); delay(1000);
Lesson 4: RGB Module

Elaborate
3. Key in the code for each color using your RGB module.

4. Answer the given questions:


a. Which device in robotics is related to colors?
b. What is the importance of using RGB module in robotics?
Lesson 4: RGB Module

Elaborate – Answer Keys


3. Key in the code for each color using your RGB module.

4. Answer the given questions:


a. Which device in robotics is related to colors? RGB Module
b. What is the importance of using RGB module in robotics?
Lesson 4: RGB Module

Evaluate
1. Manipulate your RGB module and determine the code to produce RED, BLUE and
GREEN colors with different levels of brightness.
2. Complete the table by supplying the missing code for each level of brightness.
3. Answer the question: How will you set up the color intensity of your RGB module? (Type
in the specific value for each color).
Lesson 4: RGB Module

Evaluate – Answer Keys


Yellow Green – Turquoise – Purple with Brightness Control Value
Lesson 4: RGB Module

Evaluate – Answer Keys


Yellow Green – Turquoise – Purple with Brightness Control Value
Lesson 4: RGB Module

Additional Assessment

Using the RGB LED, use these following RGB codes to program the microcontroller
to see what color that was programmed:

247, 232, 143


187, 51, 245
0, 255, 247
255, 204, 206
59, 169, 237
Lesson 4: RGB Module

Additional Assessment – Answer Keys

Using the RGB LED, use these following RGB codes to program the microcontroller
to see what color that was programmed:

247, 232, 143 – Light Yellow


187, 51, 245 – Violet
0, 255, 247 – Cyan
255, 204, 206 – Pink
59, 169, 237 – Light Blue

You might also like