0% found this document useful (0 votes)
0 views

RoboTek Arduino Level 2

This document outlines a training module on robot control and display using Arduino, focusing on safety measures and basic electronics tools like soldering irons. It includes lessons on soldering techniques, safety precautions, and practical applications in various trades such as roofing, electronics, and jewelry. Additionally, it emphasizes hands-on projects involving soldering wires to printed circuit boards (PCBs).
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

RoboTek Arduino Level 2

This document outlines a training module on robot control and display using Arduino, focusing on safety measures and basic electronics tools like soldering irons. It includes lessons on soldering techniques, safety precautions, and practical applications in various trades such as roofing, electronics, and jewelry. Additionally, it emphasizes hands-on projects involving soldering wires to printed circuit boards (PCBs).
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 365

Robot Control

and Display
Arduino Level 2
After completing this module, a student
should be able to construct robotics projects
with different input and output devices using
sensors and motors controlled and program in
an Arduino microcontroller.
How to establish a workplace safety?

Always remember and make sure that your hands are dry
(use gloves if necessary).

Make sure your working area is clean.


- No liquid materials or drinks
- No conductible material near work area

Make sure where the first aid kit is placed.


The Soldering Iron
and Other Basic
Electronics Tools
Module 1 Lesson 1
Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Target Outcomes

 Enumerate the uses and functions of a soldering iron.

TechFactors Copyright 2020


Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Engage
Guess the words:

+ + +
D
____ _________ TechFactors Copyright 2020
Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Engage - Answer Keys


Guess the words:

+ + +
D
BIND SOLDERING
IRON
TechFactors Copyright 2020
Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Explore

Familiarizing with the basic electronic tools:


1. How does a soldering iron join pieces of metal together?

2. What material is used in fastening wires together?

3. What material is used to remove soldered materials?

4. Give at least three precautionary measures in handling the soldering


iron.
TechFactors Copyright 2020
Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Explain

Solder comes from the Latin word solidare which means


“to make solid.” To assemble any electronic project, one must
learn the skill of soldering. Soldering happens when two or more
metal items are joined together to form an electrical connection
by melting a filler metal with a relatively low melting point. The
materials essential for soldering are: Soldering iron, Solder wire,
and Flux (Soldering paste).

TechFactors Copyright 2020


Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Explain

Soldering Iron is a hand tool used in soldering. It supplies heat to melt a


lead and solder a wire to make an electrical connection.

Soldering Lead is a type of metal wire


with a "low" melting point, low enough
to be melted with a soldering iron.

Desoldering Pump also known as a


solder sucker is use to the remove soldered materials or electrical
components from a circuit board for troubleshooting, repair and replacement.
TechFactors Copyright 2020
Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Explain

Flux, also called soldering paste, removes the


oxide film from the surface of metals to be soldered.

Wire is a long thin piece of metal that is used


to fasten things or to carry electric current,
power or signals from one place to another.

Wire Stripper is a small, hand-held device


used to strip the electrical insulation from electric wires.

PCB (Printed Circuit Board) is a board that connects various points together, it
has layers of copper laminated onto sheet layers of a non-conductive substrate.
TechFactors Copyright 2020
Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Elaborate
USES AND APPLICATIONS FOR A SOLDERING IRON

Soldering in the Roofing Trades

Roofers use solder to fuse galvanized metal for flashing. They also
use it to fuse components of copper roofs. Because accuracy is less
important than it is in other trades, roofing soldering irons have broad
tips that heat up quickly and the ability to retain heat in windy
conditions.
TechFactors Copyright 2020
Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Elaborate
USES AND APPLICATIONS FOR A SOLDERING IRON

Soldering Tools for Circuit Boards

Solder guarantees contact between two wires to establish electrical


continuity. In addition, solder "locks" the wiring down to the circuit
board. Because solder joints are typically small, it's common to use a
soldering pencil hooked up to a power station that allows the user to
control the temperature.
TechFactors Copyright 2020
Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Elaborate
USES AND APPLICATIONS FOR A SOLDERING IRON

Soldering for Electricians

Electricians often use solder to splice wires when doing residential


or commercial wiring. The also sometimes use solder to fuse wires to
electrical terminals inside electrical devices or on control panels.

TechFactors Copyright 2020


Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Elaborate
USES AND APPLICATIONS FOR A SOLDERING IRON

Soldering Tools for Home Projects

Soldering pencils, guns and irons that are adequate for home use are
made in abundance. Most are heated electrically and have tips that can be
used with a propane torch. The proper tool depends on the project, but
tasks like joining wires and circuit-board repairs may call for varying
amounts of heat or more control.
TechFactors Copyright 2020
Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Elaborate
USES AND APPLICATIONS FOR A SOLDERING IRON

Soldering in the Jewelry Trades

Jewelers use soldering pens and soldering irons with interchangeable


tips, and they also use accurate torches that burn propane or butane. The
solder has a high percentage of silver, and jewelers typically use borax flux
to reduce the metal oxides that form when you apply heat to metal. Flux is
an important component of any soldering job.
TechFactors Copyright 2020
Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Elaborate
USES AND APPLICATIONS FOR A SOLDERING IRON

Solder in Auto Repair

Solder isn't strong enough to make engine repairs but is used to fill
irregular cavities, smooth rough surfaces and tighten joints. It's also
used to tin the edges of metal sheets, fill up holes and fuse metal
panels when doing auto body repair.

TechFactors Copyright 2020


Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Evaluate
Direction: Fill in the table with the information needed.

TechFactors Copyright 2020


Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Evaluate – Answer Keys


Direction: Fill in the table with the information needed.

Soldering in the roofing trades copper roofs


Soldering tools for circuit boards circuit boards
Soldering for electricians electrical terminals
Soldering tools for home projects soldering pencils, guns, and iron
Soldering in the jewelry trades soldering pen, flux
Solder in auto repair metal sheets

TechFactors Copyright 2020


Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Evaluate
Direction: Give instances when soldering is necessary and how you use it.
1.

2.

3.

4.

5.

TechFactors Copyright 2020


Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Evaluate – Answer Keys


Direction: Give instances when soldering is necessary and how you use it.
1. Soldering tools for circuit boards

2. Soldering for electricians

3. Soldering tools for home projects

4. Soldering in the jewelry trades

5. Solder in auto repair


TechFactors Copyright 2020
Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Additional Assessment
Direction: Describe each material shown below:
1. 2. 3.

4. 5. 6.

TechFactors Copyright 2020


Lesson 1: The Soldering Iron and Other Basic Electronics Tools

Additional Assessment – Answer Keys


Direction: Describe each material shown below:
1. Desoldering Pump 2. Soldering Wire 3. Printed Circuit Board

4. Soldering Paste 5. Soldering Iron 6. Wire Stripper

TechFactors Copyright 2020


Using Soldering
Iron
Module 1 Lesson 2
Lesson 2: Using Soldering Iron

Target Outcomes

Practice safety precautions when using the soldering iron;

Demonstrate how to use the soldering iron; and

Identify the types of wire.

TechFactors Copyright 2020


Lesson 2: Using Soldering Iron

Engage

Watch the video for a basic soldering guide. Take note of the important
details in the video then answer the questions.

https://www.youtube.com/watch?time_continue=279&v=BLfXXRfRIzY

1. What are the materials used in soldering?


2. Why is tinning the tip of the soldering iron important?
3. What safety precaution you think is important when soldering?
TechFactors Copyright 2020
Lesson 2: Using Soldering Iron

Explore

Group Activity:

1. Put your heads together and develop a safety guidelines in


soldering.
2. Explain the importance of each guideline in ensuring safety.
3. Share your ideas in class.

TechFactors Copyright 2020


Lesson 2: Using Soldering Iron

Explain

A wire is a long thin piece of metal that is used to fasten things or


to carry electric current, power or signals from one place to another.

- Stranded Wire

- Solid Wire

TechFactors Copyright 2020


Lesson 2: Using Soldering Iron

Explain
SAFETY PRECAUTIONS IN SOLDERING

Do not play with the soldering iron either if it’s plug in or not.
Be very careful while handling the soldering iron and soldering lead.
Use a medical mask to cover your nose and mouth while using it.
Make sure to place the hot soldering iron in a soldering
stand or in a flat surface.
Do not inhale the melted lead or the smoke.
Do not touch the tip of the soldering iron or melted lead.
Clean the tip of the soldering iron before reusing it.
TechFactors Copyright 2020
Lesson 2: Using Soldering Iron

Elaborate
Here are some examples of how the joint should look and common
problems:

TechFactors Copyright 2020


Lesson 2: Using Soldering Iron

Elaborate
Follow the steps in soldering a wire.
1. Trim the wire – remove the insulator of the wire using pliers.

TechFactors Copyright 2020


Lesson 2: Using Soldering Iron

Elaborate
Follow the steps in soldering a wire.
2. Tin your wires – melt some solder into the filaments with your soldering
iron.

TechFactors Copyright 2020


Lesson 2: Using Soldering Iron

Elaborate
Follow the steps in soldering a wire.
3. Apply lead – melt the lead to coat the end of the wire.

TechFactors Copyright 2020


Lesson 2: Using Soldering Iron

Elaborate
Follow the steps in soldering a wire.
4. Connect a soldered wire together – re-apply the soldering iron and solder
the wires to each other.

TechFactors Copyright 2020


Lesson 2: Using Soldering Iron

Evaluate
My Own Creation: Design and create your own project through soldering
using any materials that can be joined through soldering. Be creative in your
design and in choosing the materials you will use.

TechFactors Copyright 2020


Lesson 2: Using Soldering Iron

Evaluate – Answer Keys


My Own Creation: Design and create your own project through soldering
using any materials that can be joined through soldering. Be creative in your
design and in choosing the materials you will use.

TechFactors Copyright 2020


Lesson 2: Using Soldering Iron

Additional Assessment
My Own Creation 2: Design and create your own project through
soldering using any materials that can be joined through soldering. Create a 3D
art figure using wires connected to each other. Example: stick figures, chair,
table, etc.

TechFactors Copyright 2020


Lesson 2: Using Soldering Iron

Additional Assessment – Answer Keys


My Own Creation 2: Design and create your own project through
soldering using any materials that can be joined through soldering. Create a 3D
art figure using wires connected to each other. Example: stick figures, chair,
table, etc.

TechFactors Copyright 2020


Project: Soldering
Wires to Printed
Circuit Board
(PCB)
Module 1 Lesson 3
Lesson 3: Project: Soldering Wires to Printed Circuit Board
(PCB)

Target Outcomes

Follow safety measures when using soldering iron;

Use the soldering iron to connect wires into the printed circuit
board; and

Demonstrate how to properly solder a wire into a switch.

TechFactors Copyright 2020


Lesson 3: Project: Soldering Wires to Printed Circuit Board
(PCB)

Engage SOLDERING WIRES TO A PCB


Activity 1: The KWL Chart: K W L
What I know? What I want to What I learned?
know?

Explore
Discussion of the KWL Chart:

TechFactors Copyright 2020


Lesson 3: Project: Soldering Wires to Printed Circuit Board
(PCB)

Explain

A Printed Circuit Board (PCB) is also known as “printed wiring


boards” or “printed wiring cards” that mechanically supports and
electrically connects electronic components using conductive
tracks, pads and other features etched
from one or more sheet layers of copper
laminated onto and/or between sheet
layers of a non-conductive substrate.

TechFactors Copyright 2020


Lesson 3: Project: Soldering Wires to Printed Circuit Board
(PCB)

Explain

A wire is connected to a PCB through soldering which may be part


of repairing or modifying the board or connecting it to another device.

Tinning the tip of the soldering iron


should be done to make the heat from
the tip transfer faster and thereby
making the soldering easier. Also, by
doing so, the process prolongs the life
of the tip of the solder.
TechFactors Copyright 2020
Lesson 3: Project: Soldering Wires to Printed Circuit Board
(PCB)

Elaborate

Try this!
Materials:
 Soldering iron
 Soldering Lead
 Soldering Pump
 Wire
 PCB
 Switch

TechFactors Copyright 2020


Lesson 3: Project: Soldering Wires to Printed Circuit Board
(PCB)

Elaborate

Try this!

TechFactors Copyright 2020


Lesson 3: Project: Soldering Wires to Printed Circuit Board
(PCB)

Evaluate

Procedure
1. Prepare all the
materials needed.
2. Trim and tin the wire.
3. Add lead into the
switch terminal end.
4. Solder the wire into
the switch.

TechFactors Copyright 2020


Lesson 3: Project: Soldering Wires to Printed Circuit Board
(PCB)

Evaluate – Answer Keys

Procedure
1. Prepare all the
materials needed.
2. Trim and tin the wire.
3. Add lead into the
switch terminal end.
4. Solder the wire into
the switch.

TechFactors Copyright 2020


Lesson 3: Project: Soldering Wires to Printed Circuit Board
(PCB)

Additional Assessment

Based on the activity you did last lesson, solder your 3D artwork on a piece
of PCB to make it as a stand. You can display your work inside your classroom
and put your name on it.

TechFactors Copyright 2020


Lesson 3: Project: Soldering Wires to Printed Circuit Board
(PCB)

Additional Assessment – Answer Keys

Based on the activity you did last lesson, solder your 3D artwork on a piece
of PCB to make it as a stand. You can display your work inside your classroom
and put your name on it.

TechFactors Copyright 2020


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.

TechFactors Copyright 2020


Lesson 4: RGB Module

Engage

What is your
favorite color?
TechFactors Copyright 2020
Lesson 4: RGB Module

Engage

TechFactors Copyright 2020


Lesson 4: RGB Module

Explore  Cardboard tube measuring approx. 2-3 inches


 Aluminum foil
Poking Fun at Color Mixing 
Wax paper
Tools and Materials:  2 Rubber bands
 Pushpin
 Red, Green, and Blue light bulbs (or LEDs)
 3 Screw-in light sockets
 Power strip with at least 3 parallel outlets
 Power source (extension cord if needed)
 Dark room
 Partner
 Optional: Black construction paper
and 2 additional rubber bands
TechFactors Copyright 2020
Lesson 4: RGB Module
1. Cut the wax paper to a size slightly larger
Explore than the diameter of the tube. Do the
Poking Fun at Color Mixing same with the aluminum foil.
Assembly 2. Cover one end of the tube with the cut
piece of aluminum foil, folding the ends
Build your pinhole viewer: over tightly and securing the foil in place
with a rubber band.
3. Cover the other end of the tube with the
cut piece of wax paper, also folding the
ends over tightly and securing in place
with a rubber band. Make sure the surface
of the wax paper is as smooth and wrinkle
free as possible; this will be your viewing
screen.
TechFactors Copyright 2020
Lesson 4: RGB Module

Explore
Poking Fun at Color Mixing
Assembly
Put together your light source:

1. Screw the red, green, and blue bulbs


into the light socket.
2. Plug all 3 sockets into the power strip
and plug the power strip into the wall,
but don’t turn the lights on yet. Place
the power strip on the table or other
surface.
TechFactors Copyright 2020
Lesson 4: RGB Module With a pushpin, make a small hole in the center of the foil on
your pinhole viewer. Next, use your finger to enlarge the hole.
The hole should be a few centimeters in diameter It can be
Explore ragged or circular in shape.

Poking Fun at Color Mixing


Make the room as dark as possible, then have your partner turn
on the red and green lights that are mounted on the power
To Do and Notice strip while you position yourself about six feet (2 meters) away.

Orient the viewer so the foil side is facing the light source and
the wax paper side is facing you. Hold the viewer up to the
light, about 8-10 inches (20 centimeters) from your face, and
look at the light being projected onto the wax paper.

Try to get the light from the green and red bulbs to overlap.
What do you notice? What techniques or modifications produce
overlapping colors? Make sure you can get the colors to overlap
before continuing.

Next, ask your partner to switch off the green light and turn on
the blue light (leaving the red light on). What do you notice?
TechFactors Copyright 2020
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 What color do you think you'll see when all three lights
light source.) What color do you see in the are turned on and overlapping? Make a prediction before
area of overlap? 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? TechFactors Copyright 2020
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.

TechFactors Copyright 2020


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.
TechFactors Copyright 2020
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.

TechFactors Copyright 2020


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.
TechFactors Copyright 2020
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);
TechFactors Copyright 2020
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);
TechFactors Copyright 2020
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?

TechFactors Copyright 2020


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?

TechFactors Copyright 2020


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).

TechFactors Copyright 2020


Lesson 4: RGB Module

Evaluate – Answer Keys


Yellow Green – Turquoise – Purple with Brightness Control
Value

TechFactors Copyright 2020


Lesson 4: RGB Module

Evaluate – Answer Keys


Yellow Green – Turquoise – Purple with Brightness Control
Value

TechFactors Copyright 2020


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

TechFactors Copyright 2020


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

TechFactors Copyright 2020


Mixing Colors
Using RGB
Module
Module 1 Lesson 5
Lesson 5: Mixing Colors Using RGB Module

Target Outcomes

Formulate codes to produce random colors with different intensity


using the RGB module;

Compare digitalWrite to analogWrite in programming; and

Identify objects that utilizes an RGB LED to produce random


colors with different intensity.

TechFactors Copyright 2020


Lesson 5: Mixing Colors Using RGB Module

Engage
RGB Color Model
https://www.khanacademy.org/partner-content/pixar/color/color-101/v/color-2

Explore
1. What are the special color receptor in our
eyes that we use in order to see colors?
2. How many color receptors do we have?
What color are they sensitive with?
3. How can we create different colors using
Red, Green, and Blue?
TechFactors Copyright 2020
Lesson 5: Mixing Colors Using RGB Module

Explain

Different codes can be used to


produce random colors from the RGB
Module. Variations in intensity of the
three colors produce different range of
colors.

The value of intensity of colors for each LED ranges from 0-255. By
adjusting the value for each color using the analogWrite function in
programming.
TechFactors Copyright 2020
Lesson 5: Mixing Colors Using RGB Module

Explain
digitalWrite
Example: blinking LED
int led = 13;
The digital pins have only two
modes - ON (1) or OFF (0). We void setup() {
pinMode(led, OUTPUT); //digital pin as an output
use the constants HIGH (on) }
and LOW (off) since this makes
it easier to read code. Digital pin void loop() {
digitalWrite(led, HIGH); //tum the LED on
always gives the output power of delay(1000); //wait for a second
5V when HIGH and 0V when LOW. digitalWrite(led. LOW); // turn the LED off by making the
voltage LOW
The pin need to be configured with delay(1000); //wait for a second
pinMode(). digitalWrite(pin,value) }
//sets pin to value (LOW or HIGH)
TechFactors Copyright 2020
Lesson 5: Mixing Colors Using RGB Module

Explain
analogWrite

The digital pins 3,5,6,9, 10 and 11 have a special function called PWM(). For these pins we are
using the command analogWrite(). With the PWM mode we can transform the 5V output into a
range of 255 possible levels. Instead of going from 0V to 5V in one instance it goes from 0V to 5V
in 255 steps.

analogWrite(pin, value); //writes 'value' to analog 'pin' //value = between 0(off) and 255 (on)

A value of 0 generates a steady 0 volts output at the specified pin; a value of 255 generates a
steady 5 volts output at the specified pin. For values in between 0 and 255, the pin rapidly
alternates between 0 and 5 volts – the higher the value, the more often the pin is HIGH (5 volts).
For example, a value of 64 will be 0 volts three-quarters of the time, and 5 volts one quarter of
the time; a value of 128 will be at 0 half the time; and a value of 192 will be 0 volts one quarter of
the time and 5 volts three-quarters of the time.
TechFactors Copyright 2020
Lesson 5: Mixing Colors Using RGB Module

Elaborate
By mixing and adjusting the intensity of Red, Green, and Blue light, different colors
can be produced through the RGB module. Our knowledge in producing different colors
with different intensities can be used in lighting and can be beneficial to our lives.
1. RGB lighting is great for performance lighting. It’s bright, beautiful and
enticing. It can be placed in the kitchen and laundry room simply for the
presence of color. They’re also great in a kid’s playroom or bedroom for
accent lighting.
2. Working as mood lighting, RGB lights are great for relaxation in a bedroom.
For example, the emission of green light is said to bring the sense of serenity
and low stress of calmness while blue light offers the feeling of calmness and
blue rooms makes people more productive.
TechFactors Copyright 2020
Lesson 5: Mixing Colors Using RGB Module

Elaborate
3. An article on Well + Good (https://www.wellandgood.com/good-looks/color-
bathing-led-lights-in-the-shower/) covers the benefits of having colored LEDs in
the shower. It says they are “emotionally therapeutic and potentially beneficial
to your skin.” They’re explained to have anti-inflammatory and antibacterial
effects. This reason alone sounds good enough! Green light supposedly
reduces tension while pink is great for drawing in the feeling of love.
4. You would think since RGB lighting is so vibrant and strong that they would
emit a lot of heat. Well, you’d be surprised to know that it’s actually the
opposite. LEDs use less energy, so naturally emit less heat (and are cheaper!)
There’s always a benefit of knowing you’re saving money and resources.

TechFactors Copyright 2020


Lesson 5: Mixing Colors Using RGB Module

Evaluate
Changing Random Colors
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
3 pc. 220Ω Resistors
1 pc. RGB Module
Create a code that will display random colors for every 30 seconds with ten
(10) repetition.

TechFactors Copyright 2020


Lesson 5: Mixing Colors Using RGB Module

Evaluate
Changing Random Colors
Key in the code for changing random colors

TechFactors Copyright 2020


Lesson 5: Mixing Colors Using RGB Module

Evaluate – Answer Keys


Changing Random Colors

TechFactors Copyright 2020


Lesson 5: Mixing Colors Using RGB Module

Evaluate
Changing Color Spectrum
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
3 pcs. 220 Ohms Resistor
1 pc. RGB Module

TechFactors Copyright 2020


Lesson 5: Mixing Colors Using RGB Module

Evaluate
Changing Color Spectrum
Key in the code for a changing random colors with different intensity

TechFactors Copyright 2020


Lesson 5: Mixing Colors Using RGB Module

Evaluate – Answer Keys


Changing Color Spectrum

TechFactors Copyright 2020


Lesson 5: Mixing Colors Using RGB Module

Additional Assessment

After generating the codes, write something about what you


understand in the changes of colors of LEDs?

TechFactors Copyright 2020


Lesson 5: Mixing Colors Using RGB Module

Additional Assessment – Answer Keys

After generating the codes, write something about what you


understand in the changes of colors of LEDs?

TechFactors Copyright 2020


4 Digital Tube
Module 1 Lesson 6
Lesson 6: 4 Digital Tube

Target Outcomes

Compare and contrast a 4 Digital Tube to a Seven-Segment


Display; and

Define a 4 Digital Tube.

TechFactors Copyright 2020


Lesson 6: 4 Digital Tube

Engage

1. Have you tried watching a ball game?


2. Did you notice a clock like display placed at the top of the board?
3. How would you describe that clock?

TechFactors Copyright 2020


Lesson 6: 4 Digital Tube

Engage

A seven-segment display
(SSD), or seven-segment indicator,
is a form of electronic display
device for displaying decimal
numerals.

The individual segments of a seven-segment display.

TechFactors Copyright 2020


Lesson 6: 4 Digital Tube

Explore

This is a picture of a seven-


segment display. Using this as
reference, determine which
segments should light up in order
to produce numbers from 0-9.

TechFactors Copyright 2020


Lesson 6: 4 Digital Tube

Explore

TechFactors Copyright 2020


Lesson 6: 4 Digital Tube

Explain

4 digital tube is a chip to form a 4-digit numerical display


module that are sometimes called “Digital Tube”.

TechFactors Copyright 2020


Lesson 6: 4 Digital Tube

Explore

What makes digital display useful?


1. Digital display provides the right information, at the right place
at the right time.

2. A well programmed digital tube will deliver information that is


relevant to the user.

3. Digital tube can be paired with sensors to trigger content based


on external stimuli. This lets the user interact with the display to
present specific content or play games.
TechFactors Copyright 2020
Lesson 6: 4 Digital Tube

Enrichment Activity
Activity: Displaying Same Numbers in 4 Digital Tube
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
4 pc. 220Ω Resistors
1 pc. 4 Digital Tube

TechFactors Copyright 2020


Lesson 6: 4 Digital Tube

Evaluate
Key in the code for the assigned numbers/letters in a 4 digital tube.

TechFactors Copyright 2020


Lesson 6: 4 Digital Tube
digitalWrite(D1, HIGH); // OFF
digitalWrite(D2, LOW); // ON
Evaluate – Answer Keys digitalWrite(D3, LOW); // ON
int pinA = pinMode (pinA, digitalWrite(D4, LOW); //ON
2; OUTPUT);
int pinB = pinMode (pinB, //0
3; OUTPUT); digitalWrite(pinA, HIGH); //ON
int pinC = pinmode (pinC, digitalWrite(pinB, HIGH); //ON
4; OUTPUT); digitalWrite(pinC, HIGH); //ON
int pinD = pinMode (pinD, digitalWrite(pinD, HIGH); //ON
5; OUTPUT); digitalWrite(pinE, HIGH); //ON
int pinE = pinMode (pinE, digitalWrite(pinF, HIGH); //ON
6; OUTPUT); digitalWrite(pinG, LOW); //OFF
int pinF = pinMode (pinF, delay(1000);
7; OUTPUT); digitalWrite(D1, LOW);
int pinG = pinMode (pinG, digitalWrite(D2, HIGH);
8; OUTPUT);
int D1 = 9; pinMode (D1, OUTPUT); TechFactors Copyright 2020
Lesson 6: 4 Digital Tube
//3
digitalWrite(pinA, HIGH);
Evaluate – Answer Keys digitalWrite(pinB, HIGH);
digitalWrite(pinC, HIGH);
digitalWrite(pinD, HIGH);
digitalWrite(pinE, LOW);
digitalWrite(D3, LOW); //2 digitalWrite(pinF, LOW);
digitalWrite(D4, LOW); digitalWrite(pinA, HIGH); digitalWrite(pinG, HIGH);
delay(1000); digitalWrite(pinB, HIGH); delay(1000);
digitalWrite(pinC, LOW);
//1 digitalWrite(pinD, HIGH); //4
digitalWrite(pinA, LOW); digitalWrite(pinE, HIGH); digitalWrite(pinA, LOW);
digitalWrite(pinB, HIGH); digitalWrite(pinF, LOW); digitalWrite(pinB, HIGH);
digitalWrite(pinC, HIGH); digitalWrite(pinG, HIGH); digitalWrite(pinC, HIGH);
digitalWrite(pinD, LOW); delay(1000); digitalWrite(pinD, LOW);
digitalWrite(pinE, LOW); digitalWrite(D1, LOW); digitalWrite(pinE, LOW);
digitalWrite(pinF, LOW); digitalWrite(D2, LOW); digitalWrite(pinF, HIGH);
digitalWrite (pinG, LOW); digitalWrite(D3, LOW); digitalWrite(pinG, HIGH);
delay(1000); digitalWrite(D4, HIGH); delay(1000);

TechFactors Copyright 2020


//6
Lesson 6: 4 Digital Tube digitalWrite(pinA, HIGH);
digitalWrite(pinB, LOW;
//8
digitalWrite(ping, HIGH);
digitalWrite(pinA, HIGH);
digitalWrite(pinD, HIGH);
digitalWrite(pinB, HIGH);
Evaluate – Answer Keys digitalWrite(pinE, HIGH);
digitalWrite(pinF, HIGH);
digitalWrite(pinC, HIGH);
digitalWrite(pinD, HIGH);
digitalWrite(pinG, HIGH);
digitalWrite(pinE, HIGH);
delay(1000);
digitalWrite(pinF, HIGH);
//5 digitalWrite(pinG, HIGH);
//7
digitalWrite(pinA, HIGH); delay(1000);
digitalWrite(pinA, HIGH);
digitalWrite(pinB, LOW); digitalWrite(pinB, HIGH);
digitalWrite(pinC, HIGH); //9
digitalWrite(pinC, HIGH);
digitalWrite(pinD, HIGH); digitalWrite(pinA, HIGH);
digitalWrite(pinD, LOW);
digitalWrite(pinE, LOW); digitalWrite(pinB, HIGH);
digitalWrite(pinE, LOW);
digitalWrite(pinF, HIGH); digitalWrite(pinC, HIGH);
digitalWrite(pinF, LOW);
digitalWrite(pinG, HIGH); digitalWrite(pinD, LOW);
digitalWrite(pinG, LOW);
delay(1000); digitalWrite(pinE, LOW);
delay(1000);
digitalWrite(pinF, HIGH);
digitalWrite(D1, LOW);
digitalWrite(pinG, HIGH);
digitalWrite(D2, LOW);
delay(1000);
digitalWrite(D3, LOW);
}
digitalWrite(D4, LOW);
TechFactors Copyright 2020
Lesson 6: 4 Digital Tube

Additional Assessment

Form a group, using a 4 digital tube, perform a spelling bee game


with a twist. The groups should provide the code that was used in
spelling the correct answer. First team to spell correctly and show the
code wins.

TechFactors Copyright 2020


Lesson 6: 4 Digital Tube

Additional Assessment – Answer Keys

Form a group, using a 4 digital tube, perform a spelling bee game


with a twist. The groups should provide the code that was used in
spelling the correct answer. First team to spell correctly and show the
code wins.

TechFactors Copyright 2020


Working with
4 Digital Tube
Module 1 Lesson 7
Lesson 7: Working with 4 Digital Tube

Target Outcomes
Determine the correct code to produce numbers and letters in a 4
digital
tube; and

Enumerate the uses of a 4 Digital Tube.

TechFactors Copyright 2020


Lesson 7: Working with 4 Digital Tube

Engage WORKING WITH 4 DIGITAL TUBE


Activity 1: The KWL Chart: K W L
What I know? What I want to What I learned?
know?

Explore
Discussion of the KWL Chart:

TechFactors Copyright 2020


Lesson 7: Working with 4 Digital Tube

Explain

Each segment in a digit corresponds


to a letter from A-G where codes are used to
display numbers and letters in a 4 digital tube.

4 digital tubes are widely used in digital clocks, electronic meters, basic
calculators, and other electronic devices that display numerical information.

TechFactors Copyright 2020


Lesson 7: Working with 4 Digital Tube

Elaborate
Activity 1: Type a Number to Display
Materials
Microcontroller
Breadboard
USB Cable
4 pcs. 220 Ohms Resistors
Jumper Wire
1 pc 4 Digital Tube

TechFactors Copyright 2020


Lesson 7: Working with 4 Digital Tube

Elaborate
Activity 1: Type a Number to Display
Procedure:
1. Each group must form a circle.
2. Prepare your 4 digital tube.
3. Your teacher will ask questions. Display your answer using your 4 digital
tube.
4. The first group to give the correct answer will get the corresponding
score.
5. The group with the highest accumulated score will get 30 points, the
second
highest will get 25 points followed by 20, 15, and 10 points.
TechFactors Copyright 2020
Lesson 7: Working with 4 Digital Tube

Elaborate
Answer the following questions using your 4 digital tube:
1. Ten apples was divided by five children. How many apples will each child
have?

2. When is Christmas day celebrated? December ___

3. What is the animal known to be the man’s best friend?

4. What is the opposite of bad?

5. What do you call a system of words, letters, figures, or other symbols


substituted for other words, letters, etc., especially for the purposes of
secrecy?
TechFactors Copyright 2020
Lesson 7: Working with 4 Digital Tube

Elaborate – Answer Keys


Answer the following questions using your 4 digital tube:
1. Ten apples was divided by five children. How many apples will each child
have? 2

2. When is Christmas day celebrated? December ___ 25

3. What is the animal known to be the man’s best friend? DOG

4. What is the opposite of bad? GOOD

5. What do you call a system of words, letters, figures, or other symbols


substituted for other words, letters, etc., especially for the purposes of
secrecy? CODE
TechFactors Copyright 2020
Lesson 7: Working with 4 Digital Tube

Evaluate
Using your 4 digital tube, code a two/three/four letter word. Write
the code on the space provided then share it with the class.

TechFactors Copyright 2020


Lesson 7: Working with 4 Digital Tube

Evaluate – Answer Keys


Using your 4 digital tube, code a two/three/four letter word. Write
the code on the space provided then share it with the class.

TechFactors Copyright 2020


Lesson 7: Working with 4 Digital Tube

Additional Assessment
Solve the following math equations using your 4 digital tube:
1. 378 x 24 = ?

2. 89 x 51 - 706 = ?

3. 862 x 750 / 423 = ?

4. 568 - 357 + 811 = ?

5. (942 / 8) + (12 x 83) = ?


TechFactors Copyright 2020
Lesson 7: Working with 4 Digital Tube

Additional Assessment – Answer Keys


Solve the following math equations using your 4 digital tube:
1. 378 x 24 = 9072

2. 89 x 51 - 706 = 3833

3. 862 x 750 / 423 = 1528

4. 568 - 357 + 811 = 1022

5. (942 / 8) + (12 x 83) = 1114


TechFactors Copyright 2020
Light Dependent
Resistor (LDR)
Module 2 Lesson 8
Lesson 8: Light Dependent Resistor (LDR)

Target Outcomes

Cite practical uses and applications of the LDR sensor;

Identify some factors affecting the function of an LDR sensor.

TechFactors Copyright 2020


Lesson 8: Light Dependent Resistor (LDR)

Engage

TechFactors Copyright 2020


Lesson 8: Light Dependent Resistor (LDR)

Explain

A Photoresistor or Light Dependent Resistor


is a component that is sensitive to light. When light
falls upon it then the resistance changes. Values of
the resistance of the LDR may change over
many orders of magnitude the value of the
resistance falling as the level of light increases.

TechFactors Copyright 2020


Lesson 8: Light Dependent Resistor (LDR)

Explain

They are made up of semiconductor


materials having high resistance. There
are many different symbols used to
indicate a LDR, one of the most commonly
used symbol is shown in the figure below.
The arrow indicates light falling on it.

TechFactors Copyright 2020


Lesson 8: Light Dependent Resistor (LDR)

Explain

LDR (Light Dependent Resistor) varies


its resistance based on the amount of light
that hits the surface, we can measure the
resistance and use that to determine the
level of light present.

TechFactors Copyright 2020


Lesson 8: Light Dependent Resistor (LDR)

Explain
Parts of LDR

TechFactors Copyright 2020


Lesson 8: Light Dependent Resistor (LDR)

Explain

LDR’s have low cost and simple structure.


They are often used as light sensors. They are
used when there is a need to detect absences
or presences of light.

Cameras use LDR to for shutter control and


flash control they both work depending on the
amount of light hitting the surface of the LDR.
TechFactors Copyright 2020
Enhancement Activity: Copy the circuit and code to manipulate the
values for brightness and darkness of light. Check Values for
minimum and maximum value of darkness and brightness in the
serial monitor
Enrichment Activity: Copy the
circuit

TechFactors Copyright 2020


Enrichment Activity: Copy code and upload

TechFactors Copyright 2020


Working
with LDR
Module 2 Lesson 9
Lesson 9: Working with LDR

Target Outcomes

Determine the codes used for programming an LDR sensor;

Use the if and else statement in programming the robot; and

Be familiar with “if and else statement” in programing.

TechFactors Copyright 2020


Lesson 9: Working with LDR

Engage
Modified True or False: Write TRUE if the statement is true. If
FALSE, change the underlined word to make the statement correct.

1. LDR stands for Light Dependent Ratio.


2. The LDR can be used as sensor.
3. The LDR is made up of semiconductor materials having high
resistance.
4. The resistance of LDR varies based on the amount of shadow
that hits its surface.
5. In most common types of LDR, the resistance increases as the
light intensity falling upon the device increases.
TechFactors Copyright 2020
Lesson 9: Working with LDR

Engage – Answer Keys


Modified True or False: Write TRUE if the statement is true. If
FALSE, change the underlined word to make the statement correct.

1. FALSE, Resistor
2. TRUE
3. TRUE
4. FALSE, light
5. FALSE, decreases

TechFactors Copyright 2020


Lesson 9: Working with LDR

Explore
Activity 1: LDR as a Light Sensor
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 220Ω Resistors
1 pc. LDR Sensor
1 pc. LED (Any Color)

TechFactors Copyright 2020


Lesson 9: Working with LDR

Explore – Answer Keys


int ledpin = 13; if (ldrStatus <=300){
int ldrpin = A0; digitalWrite(ledpin, HIGH); //turn LED
on
void setup() { Serial.println("LDR is DARK,LED is
pinMode(ledpin, OUTPUT); ON");
pinMode(ldrpin, INPUT); }
Serial.begin(9600); // set baud rate at “9600”
} else{
digitalWrite(ledpin,LOW); //turn LED
void loop() { off
int ldrStatus = analogRead(ldrpin); Serial.println("-----------------");
// check if the ldr status is <=300 }
//if it is , the LED is HIGH }
TechFactors Copyright 2020
Lesson 9: Working with LDR

Explore

1. What happens to the LED when the level of light that hits the
surface of the LDR decreases?

2. What happens to the LED when the level of light that hits the
surface of the LDR increases?

3. How will you describe the relationship between the amount of light
that hits the LDR to resistance based on LED’s response?

TechFactors Copyright 2020


Lesson 9: Working with LDR

Explain

A Light Dependent Resistor may turn on and off when light changes its
intensity. Thus, it may be used as a light sensor. An LDR may also be used as a
switch according to the ambient light.

Light Sensors are photoelectric devices that convert light energy (photons)
whether visible or infra-red light into an electrical (electrons) signal.

A Light Sensor generates an output signal indicating the intensity of light by


measuring the radiant energy that exists in a very narrow range of frequencies
basically called “light”, and which ranges in frequency from “Infra-red” to
“Visible” up to “Ultraviolet” light spectrum.
TechFactors Copyright 2020
Lesson 9: Working with LDR

Explain

This basic light sensor circuit is of


a relay output light activated switch.
A potential divider circuit is formed
between the photoresistor, LDR and
the resistor R1. When no light is present
i.e. in darkness, the resistance of the LDR
is very high in the Mega ohms (MΩ) range
so zero base bias is applied to the transistor
TR1 and the relay is de-energized or “OFF”.
TechFactors Copyright 2020
Lesson 9: Working with LDR

Explain

As the light level increases the resistance


of the LDR starts to decrease causing the base
bias voltage at V1 to rise. At some point
determined by the potential divider network
formed with resistor R1, the base bias voltage
is high enough to turn the transistor TR1 “ON”.

TechFactors Copyright 2020


Lesson 9: Working with LDR

Explain
int inPin = AO; //Pin the sensor is connected to
int sensorVal = 0; //Variable to store sensor data

void setup () {
Serial.begin(9600);
Serial.println("Serial Communication started... \n");
}

void loop () {
sensorVal = analogRead(inPin);
//analogRead will read the voltage on the pin specified and return it as a value between 0 and 1024.
Serial.printin(sensorVal);
//Print the sensor reading to the serial window so we can view the data.
}
TechFactors Copyright 2020
Lesson 9: Working with LDR

Explain

1. What is the sensor value when it is bright?

2. What is the sensor value when it is dark?

3. From what you have observed based on the values depending


on the amount of light, how will you use this concept in
programming the LDR with another device like LED?

TechFactors Copyright 2020


Lesson 9: Working with LDR

Explain – Answer Keys

1. What is the sensor value when it is bright? More than 700

2. What is the sensor value when it is dark? Less than 700

3. From what you have observed based on the values depending


on the amount of light, how will you use this concept in
programming the LDR with another device like LED?

TechFactors Copyright 2020


Lesson 9: Working with LDR

Evaluate
Activity 2: LDR Sensor with LED (Light Level Sensor)
Materials
 Microcontroller
 Jumper Wire
 Breadboard
 5 pcs. 220Ω Resistors
 4 pcs. LED (Any Color)
 1 pc. LDR Sensor

Procedure
1. Form a group with ___ members.
2. Follow the setup in the schematic and key in the code for this activity.
TechFactors Copyright 2020
Lesson 9: Working with LDR

Evaluate – Answer Keys


const int ldrPin = A0; void setup() {
Serial.begin(9600);
const int ledPin1 = 9;
pinMode(ledPin1, OUTPUT);
const int ledPin2 = 10;
pinMode(ledPin2, OUTPUT);
const int ledPin3 = 11;
pinMode(ledPin3, OUTPUT);
const int ledPin4 = 12;
pinMode(ledPin4, OUTPUT);
}
int ldrValue = 0;
int ldrlevel=400; // level sensitivity LDR void loop() {
int ldrlevel1=600; // level sensitivity LDR ldrValue = analogRead(ldrPin);
int ldrlevel2=700; // level sensitivity LDR Serial.println(ldrValue);
int ldrlevel3=800; // level sensitivity LDR
int ldrlevel4=900; // level sensitivity LDR
TechFactors Copyright 2020
Lesson 9: Working with LDR

Evaluate – Answer Keys


if (ldrValue < ldrlevel) { else if (ldrValue < ldrlevel2) {
digitalWrite(buzzer, HIGH); digitalWrite(ledPin3, LOW);
digitalWrite(ledPin2, HIGH);
}
}
else if (ldrValue < ldrlevel0) { else if (ldrValue < ldrlevel3) {
digitalWrite(ledPin4, HIGH); digitalWrite(ledPin2, LOW);
} digitalWrite(ledPin1, HIGH);
else if (ldrValue < ldrlevel1) { }
else (ldrValue < ldrlevel4) {
digitalWrite(ledPin4, LOW);
digitalWrite(ledPin1, LOW);
digitalWrite(ledPin3, HIGH); }
} }
TechFactors Copyright 2020
Lesson 9: Working with LDR

Additional Assessment

Write something about what you have learned from the differences
in LDR when there is light and when there is none.

TechFactors Copyright 2020


Lesson 9: Working with LDR

Additional Assessment – Answer Keys

Write something about what you have learned from the differences
in LDR when there is light and when there is none.

TechFactors Copyright 2020


Combination
Project: RGB + 7
Segment Display
Module 2 Lesson 10
Lesson 10: Combination Project: RGB + 7 Segment Display

Target Outcomes

Create a combined project using RGB with 7 Segment Display.

TechFactors Copyright 2020


Lesson 10: Combination Project: RGB + 7 Segment Display

Engage

TechFactors Copyright 2020


Lesson 10: Combination Project: RGB + 7 Segment Display

Explore

TechFactors Copyright 2020


R G B
-

TechFactors Copyright 2020


TechFactors Copyright 2020
Combination
Project: RGB +
Buzzer + LDR
Module 2 Lesson 11
Lesson 11: Combination Project: RGB + Buzzer + LDR

Target Outcomes

Create a combined project using the RGB with Buzzer and the
LDR with Buzzer.

TechFactors Copyright 2020


Lesson 11: Combination Project: RGB + Buzzer + LDR

Engage

TechFactors Copyright 2020


Lesson 11: Combination Project: RGB + Buzzer + LDR

Explore
Complete Turn Taking Activity
1. Have the entire class arrange themselves by group.
2. One student reads a question aloud. The student to their left then
has one minute of uninterrupted time to speak and give their thoughts.
This person signals that they are done speaking by saying, “OK, I’m
done.”
3. The next person to the left goes, has one minute of uninterrupted
time to speak, and signals they are done by saying, “OK I’m done.”
Finally, the third student to the left goes, following the same pattern.
4. After three people have had a chance to speak, the conversation is
opened up to the whole group for two minutes of discussion.
The next student gets to ask a question, and this cycle continues.
TechFactors Copyright 2020
Lesson 11: Combination Project: RGB + Buzzer + LDR

Explain

The RGB module together with a buzzer can be used as an


indicator for a specific function in a device.

The LDR may act as a switch for the buzzer in which the presence
of light will act as a sensor for the buzzer to turn ON or OFF.

The buzzer’s output sound level may vary depending on the


ambient light or intensity of the light thrown on the LDR or the color
being displayed by the RGB module.
TechFactors Copyright 2020
Lesson 11: Combination Project: RGB + Buzzer + LDR

Explain

An RGB LED is actually three small


LEDs – one red, one green and one blue –
inside a normal LED housing. The RGB LED
included in this kit has all the internal LEDs
share the same ground wire, so there are
four legs in total. To turn one color on, ensure
ground is connected, then power one of the legs just as you would a
regular LED. If you turn on more than one color at a time, you will see
the colors start to blend together to form a new color.
TechFactors Copyright 2020
Lesson 11: Combination Project: RGB + Buzzer + LDR

Explain

A buzzer or beeper is an audio


signaling device, which may be mechanical,
electromechanical, or piezoelectric (piezo for
short). Typical uses of buzzers and beepers
include alarm devices, timers, and confirmation
of user input such as a mouse click or keystroke.

TechFactors Copyright 2020


Lesson 11: Combination Project: RGB + Buzzer + LDR

Elaborate
Applications of LDRs
Lighting switch
The most obvious application for an LDR is to automatically turn on a
light at a certain light level. An example of this could be a streetlight or a
garden light.

Camera shutter control


LDRs can be used to control the shutter speed on a camera. The LDR
would be used to measure the light intensity, which then adjusts the camera
shutter speed to the appropriate level. Typical uses of buzzers include alarm
devices, timers, and confirmation of user input such as a mouse click or
keystroke. TechFactors Copyright 2020
Lesson 11: Combination Project: RGB + Buzzer + LDR

Elaborate
Activity 1: RGB Module with Buzzer (Alarm System Red +
Green)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
4 pcs. 220Ω Resistors
1 pc. RGB Module
1 pc. Buzzer

TechFactors Copyright 2020


Lesson 11: Combination Project: RGB + Buzzer + LDR

Elaborate – Answer Keys


void loop() {
digitalWrite(buzzer, HIGH); //produce sound
int buzzer = 2; // Red (turn just the red LED on):
int RED_PIN = 9; digitalWrite(RED_PIN, HIGH);
int GREEN_PIN = 10; digitalWrite(GREEN_PIN, LOW);
int BLUE_PIN = 11; digitalWrite(BLUE_PIN, LOW);
delay (500);
void setup() { digitalWrite(buzzer, LOW); // NO Sound
pinMode (buzzer, OUTPUT); // Green (turn just the green LED on):
pinMode(RED_PIN, OUTPUT); digitalWrite(RED_PIN, LOW);
digitalWrite(GREEN_PIN, HIGH);
pinMode(GREEN_PIN, OUTPUT);
digitalWrite(BLUE_PIN, LOW);
pinMode(BLUE_PIN, OUTPUT);
delay (500);
} }

TechFactors Copyright 2020


Lesson 11: Combination Project: RGB + Buzzer + LDR

Evaluate
Activity 2: LDR with Buzzer (Light Identifier)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
4 pcs. 220Ω Resistors
1 pc. Buzzer
1 pc. LED (Any Color)

TechFactors Copyright 2020


Lesson 11: Combination Project: RGB + Buzzer + LDR

void loop() {
Evaluate – Answer Keys int ldrStatus = analogRead(ldrpin);
// check if the ldr status is <=300
int buzzer= 2; //if it is , the LED is HIGH
int ledpin = 5; if (ldrStatus <=300) {
int ldrpin = A0; digitalWrite(ledpin, HIGH); //turn LED on
digitalWrite(buzzer, LOW); // NO Sound
void setup() { Serial.println("LDR is DARK, LED is ON");
pinMode(ledpin, OUTPUT); }
pinMode(buzzer, OUTPUT); else {
pinMode(ldrpin, INPUT); digitalWrite(ledpin, LOW); //turn LED off
digitalWrite(buzzer, HIGH); //produce sound
Serial.begin(9600);
Serial.println("--LED OFF—SOUND ON--");
// set baud rate at “9600”
}
} }

TechFactors Copyright 2020


Lesson 11: Combination Project: RGB + Buzzer + LDR

Additional Assessment

Reflect on the activities you’ve already done and make an


assessment of yourself based on what you’ve learned on this activity.
Write it in a sheet of paper.

TechFactors Copyright 2020


Lesson 11: Combination Project: RGB + Buzzer + LDR

Additional Assessment – Answer Keys

Reflect on the activities you’ve already done and make an


assessment of yourself based on what you’ve learned on this activity.
Write it in a sheet of paper.

TechFactors Copyright 2020


Combination
Project: LDR +
LED + Buzzer
Module 2 Lesson 12
Lesson 12: Combination Project: LDR + LED + Buzzer

Target Outcomes

Recall the codes and commands about LDR and LED to be able to
create a combined project using the LDR + LED + buzzer.

TechFactors Copyright 2020


Lesson 12: Combination Project: LDR + LED + Buzzer

Engage
Kapitang Kulay

TechFactors Copyright 2020


Lesson 12: Combination Project: LDR + LED + Buzzer

Explore

TechFactors Copyright 2020


Lesson 12: Combination Project: LDR + LED + Buzzer

Explore
Write down the steps in creating a project using LDR+LED+Buzzer
based on the pictures.
1. 2.

TechFactors Copyright 2020


Lesson 12: Combination Project: LDR + LED + Buzzer

Explore
Write down the steps in creating a project using LDR+LED+Buzzer
based on the pictures.
3. 4.

TechFactors Copyright 2020


Lesson 12: Combination Project: LDR + LED + Buzzer

Explain

An LDR can be used as a switch for a buzzer and a LED.

The LDR can act as a light sensor in the project; when light shines
on the LDR, the buzzer will alarm and the led will start flashing.

Three components can be used together to perform individual


functions that are interconnected.

TechFactors Copyright 2020


Lesson 12: Combination Project: LDR + LED + Buzzer

Elaborate

TechFactors Copyright 2020


Lesson 12: Combination Project: LDR + LED + Buzzer

Evaluate
Activity 1: LDR with Buzzer (Light Identifier)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
4 pcs. 220Ω Resistors
1 pc. Buzzer
5 pcs. LED (Any Color)

TechFactors Copyright 2020


Lesson 12: Combination Project: LDR + LED + Buzzer
digitalWrite(ledPin4,
LOW);
Evaluate – Answer Keys digitalWrite(ledPin3,
void setup() { HIGH);
int ldrPin = A0; pinMode(ledPin0, OUTPUT); }
int ledPin0 = 8; pinMode(ledPin1, OUTPUT); else if (ldrValue < ldrlevel2) {
int ledPin1 = 9; pinMode(ledPin2, OUTPUT); digitalWrite(ledPin3,
int ledPin2 = 10; pinMode(ledPin3, OUTPUT); LOW);
int ledPin3 = 11; pinMode(ledPin4, OUTPUT); digitalWrite(ledPin2,
int ledPin4 = 12; pinMode(buzzer, OUTPUT); HIGH);
int buzzer = 13; } }
int ldrValue = 0; else if (ldrValue < ldrlevel3) {
// level sensitivity LDR void loop() { digitalWrite(ledPin2,
int ldrlevel=400; ldrValue = analogRead(ldrPin); LOW);
int ldrlevel0=500; if (ldrValue < ldrlevel) { digitalWrite(ledPin1,
int ldrlevel1=600; digitalWrite(buzzer, HIGH);
int ldrlevel2=700; HIGH); }
int ldrlevel3=800; } else if (ldrValue < ldrlevel4) {
int ldrlevel4=900; else if (ldrValue < ldrlevel0) { digitalWrite(ledPin1,
digitalWrite(ledPin4, LOW);
TechFactors Copyright 2020
HIGH); digitalWrite(ledPin0,
Lesson 12: Combination Project: LDR + LED + Buzzer

Additional Assessment

Create a program that will make a siren-like circuit. The lights will
alternatively blink while the buzzer will produce a sound with different
intensities.

TechFactors Copyright 2020


Lesson 12: Combination Project: LDR + LED + Buzzer

Additional Assessment – Answer Keys

Create a program that will make a siren-like circuit. The lights will
alternatively blink while the buzzer will produce a sound with different
intensities.

TechFactors Copyright 2020


Combination
Project: 4 Digital
Tube +
Potentiometer
Module 2 Lesson 13
Lesson 13: Combination Project: 4 Digital Tube + Potentiometer

Target Outcomes

Create a combined project using the 4 Digital Tube with


Potentiometer.

TechFactors Copyright 2020


Lesson 13: Combination Project: 4 Digital Tube + Potentiometer

Engage
Activity 1: Recall the previous lesson about digital tube by
completing the table below.

TechFactors Copyright 2020


Lesson 13: Combination Project: 4 Digital Tube + Potentiometer

Engage – Answer Keys


Activity 1: Recall the previous lesson about digital tube by
completing the table below.

TechFactors Copyright 2020


Lesson 13: Combination Project: 4 Digital Tube + Potentiometer

Explore
Describe me!

TechFactors Copyright 2020


Lesson 13: Combination Project: 4 Digital Tube + Potentiometer

Explain

A potentiometer is a manually adjustable, variable resistor with


three terminals. Two terminals are connected to a resistive element,
the third terminal is connected to an adjustable wiper. The position of
the wiper determines the output voltage.

Schematic Symbol of a
Potentiometer TechFactors Copyright 2020
Lesson 13: Combination Project: 4 Digital Tube + Potentiometer

Explain

The variable resistance provided by the potentiometer can be


displayed using a 4 digital tube.

The number displayed on a 4 digital tube can be controlled based


on the value given off by the potentiometer.

TechFactors Copyright 2020


Lesson 13: Combination Project: 4 Digital Tube + Potentiometer

Elaborate

One project that you can make using


digital tube and potentiometer is an Arduino
FM radio where the digital tube displays the
channels and the potentiometer act as
controller to adjust the channels.

TechFactors Copyright 2020


Lesson 13: Combination Project: 4 Digital Tube + Potentiometer

Evaluate
Activity 1: Adding Number with Potentiometer Control
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
4 pc. 220Ω Resistors
1 pc. 4 Digital Tube
Potentiometer

TechFactors Copyright 2020


Lesson 13: Combination Project: 4 Digital Tube + Potentiometer
void displayNumber(int toDisplay) {
#define DISPLAY_BRIGHTNESS 300
Evaluate – Answer Keys #define DIGIT_ON LOW
#define DIGIT_OFF HIGH
void setup() {
pinMode(segA, OUTPUT); long beginTime = millis();
int digit1 = 9; for(int digit = 4 ; digit > 0 ; digit--) {
pinMode(segB, OUTPUT);
int digit2 = 10; //Turn on a digit for a short amount of
pinMode(segC, OUTPUT);
int digit3 = 11;
pinMode(segD, OUTPUT); time
int digit4 = 12; switch(digit) {
pinMode(segE, OUTPUT);
int segA = 2; case 1:
pinMode(segF, OUTPUT);
int segB = 3; digitalWrite(digit1,
pinMode(segG, OUTPUT);
int segC = 4;
pinMode(digit1, OUTPUT); DIGIT_ON);
int segD = 5; break;
pinMode(digit2, OUTPUT);
int segE = 6; case 2:
pinMode(digit3, OUTPUT);
int segF = 7; digitalWrite(digit2,
pinMode(digit4, OUTPUT);
int segG = 8; DIGIT_ON);
}
int num=0; break;
int potpin = A0; case 3:
void loop() {
int val = 0; digitalWrite(digit3,
val = analogRead(potpin);
val = map(val, 0, 1023, 0,DIGIT_ON);
9999); break; TechFactors Copyright 2020

displayNumber(val); case 4:
Lesson 13: Combination Project: 4 Digital Tube + Potentiometer

Evaluate – Answer Keys while( (millis() - beginTime) < 10);


//Wait for 10ms to pass before it display
again
//Turn on the right segments for this digit }
lightNumber(toDisplay % 10); //Given a number, turns on those segments
toDisplay /= 10; //If number == 10, then turn off number
delayMicroseconds (DISPLAY_BRIGHTNESS);
//Display this digit for a fraction of a second void lightNumber(int numberToDisplay) {
//(between 1us and 5000us, 500 is pretty good) //may be need invert
//Turn off all segments #define SEGMENT_ON HIGH
lightNumber(10); #define SEGMENT_OFF LOW
//Turn off all digits switch (numberToDisplay) {
digitalWrite(digit1, DIGIT_OFF); case 0:
digitalWrite(digit2, DIGIT_OFF); digitalWrite(segA,
digitalWrite(digit3, DIGIT_OFF); SEGMENT_ON);
digitalWrite(digit4, DIGIT_OFF); digitalWrite(segB,
} SEGMENT_ON);
digitalWrite(segC,
SEGMENT_ON); TechFactors Copyright 2020
digitalWrite(segD,
Lesson 13: Combination Project: 4 Digital Tube + Potentiometer

digitalWrite(segC,
Evaluate – Answer Keys SEGMENT_OFF);
digitalWrite(segD, SEGMENT_ON);
digitalWrite(segF, SEGMENT_ON); digitalWrite(segE, SEGMENT_ON);
digitalWrite(segG, SEGMENT_OFF); digitalWrite(segF,
break; SEGMENT_OFF);
case 1: digitalWrite(segG, SEGMENT_ON);
digitalWrite(segA, SEGMENT_OFF); break;
digitalWrite(segB, SEGMENT_ON); case 3:
digitalWrite(segC, SEGMENT_ON); digitalWrite(segA, SEGMENT_ON);
digitalWrite(segD, SEGMENT_OFF); digitalWrite(segB, SEGMENT_ON);
digitalWrite(segE, SEGMENT_OFF); digitalWrite(segC, SEGMENT_ON);
digitalWrite(segF, SEGMENT_OFF); digitalWrite(segD, SEGMENT_ON);
digitalWrite(segG, SEGMENT_OFF); digitalWrite(segE,
break; SEGMENT_OFF);
case 2: digitalWrite(segF,
digitalWrite(segA, SEGMENT_ON); SEGMENT_OFF);
digitalWrite(segB, SEGMENT_ON); digitalWrite(segG, SEGMENT_ON);
break;
TechFactors Copyright 2020
case 4:
Lesson 13: Combination Project: 4 Digital Tube + Potentiometer

case 6:
Evaluate – Answer Keys digitalWrite(segA, SEGMENT_ON);
digitalWrite(segB,
digitalWrite(segC, SEGMENT_ON); SEGMENT_OFF);
digitalWrite(segD, SEGMENT_OFF); digitalWrite(segC, SEGMENT_ON);
digitalWrite(segE, SEGMENT_OFF); digitalWrite(segD, SEGMENT_ON);
digitalWrite(segF, SEGMENT_ON); digitalWrite(segE, SEGMENT_ON);
digitalWrite(segG, SEGMENT_ON); digitalWrite(segF, SEGMENT_ON);
break; digitalWrite(segG, SEGMENT_ON);
case 5: break;
digitalWrite(segA, SEGMENT_ON); case 7:
digitalWrite(segB, SEGMENT_OFF); digitalWrite(segA, SEGMENT_ON);
digitalWrite(segC, SEGMENT_ON); digitalWrite(segB, SEGMENT_ON);
digitalWrite(segD, SEGMENT_ON); digitalWrite(segC, SEGMENT_ON);
digitalWrite(segE, SEGMENT_OFF); digitalWrite(segD,
digitalWrite(segF, SEGMENT_ON); SEGMENT_OFF);
digitalWrite(segG, SEGMENT_ON); digitalWrite(segE,
break; SEGMENT_OFF);
digitalWrite(segF,
TechFactors Copyright 2020
SEGMENT_OFF);
Lesson 13: Combination Project: 4 Digital Tube + Potentiometer

Evaluate – Answer Keys


case 8: digitalWrite(segF,
digitalWrite(segA, SEGMENT_ON); SEGMENT_ON);
digitalWrite(segB, SEGMENT_ON); digitalWrite(segG,
digitalWrite(segC, SEGMENT_ON); SEGMENT_ON);
digitalWrite(segD, SEGMENT_ON); break;
digitalWrite(segE, SEGMENT_ON); case 10:
digitalWrite(segF, SEGMENT_ON); digitalWrite(segA,
digitalWrite(segG, SEGMENT_ON); SEGMENT_OFF);
break; digitalWrite(segB,
case 9: SEGMENT_OFF);
digitalWrite(segA, SEGMENT_ON); digitalWrite(segC,
digitalWrite(segB, SEGMENT_ON); SEGMENT_OFF);
digitalWrite(segC, SEGMENT_ON); digitalWrite(segD,
digitalWrite(segD, SEGMENT_ON); SEGMENT_OFF);
digitalWrite(segE, SEGMENT_OFF); digitalWrite(segE,
SEGMENT_OFF);
digitalWrite(segF, TechFactors Copyright 2020

SEGMENT_OFF);
Lesson 13: Combination Project: 4 Digital Tube + Potentiometer

Additional Assessment

Write something about what you have learned based on the


activity you have done in this lesson.

TechFactors Copyright 2020


Lesson 13: Combination Project: 4 Digital Tube + Potentiometer

Additional Assessment – Answer Keys

Write something about what you have learned based on the


activity you have done in this lesson.

TechFactors Copyright 2020


Tilt Switch
Module 3 Lesson 14
Lesson 14: Tilt Switch

Mercury is a poisonous substance.


Make sure not to touch the chemicals
with your bare hands.

If accidentally spilled or broken, wash


the affected parts with running water.

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Target Outcomes

Cite examples of practical applications and uses of a tilt switch.

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Engage
Pictionary

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Engage – Answer Keys


Pictionary
TILT SWITCH

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Explore

1. Describe the tilt switch.

2. Observe the tilt switch by tilting in


the direction of the opposite pole.
How does it work?

3. When do you say that it is switched on?

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Explore

Tilt Switch or Mercury Switch is an electrical


switch that opens and closes a circuit when a small
amount of the liquid metal mercury connects metal
electrodes to close the circuit. When it is tilted a
small amount of the liquid metal mercury makes
contact with metal electrodes to close the circuit.

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Explore
The basic parts of a tilt switch:

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Explore

Tilt switch or Mercury switch is influenced by MOTION and GRAVITY

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Explain
The Uses and Applications of Tilt Switch

Roll Sensing

Tilt switches provide a rollover or tip over warning for


applications like construction equipment and lift vehicles that
operate in rugged terrain. There are several non-mercury types,
but few are implemented due to sensitivity to shock and vibration,
causing false tripping. However, devices resistant to shock and
vibration do exist.

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Explain
The Uses and Applications of Tilt Switch

Automotive Uses

Automobile manufacturers once used mercury switches for


lighting controls (for example, trunk lid lights), ride control, and
anti-lock braking systems. Scrapped automobiles can leak mercury
to the environment if these switches are not properly removed.
Since 2003, new American-built cars no longer use mercury
switches.

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Explain
The Uses and Applications of Tilt Switch

Fall Alarm

Work performed in confined space (such as a welder inside a


tank) raises special safety concerns. Tilt switches sound an alarm if
a worker falls over.

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Explain
The Uses and Applications of Tilt Switch

Air Craft

Electrically driven attitude indicators typically use mercury


switches to keep the gyro axis vertical. When the gyro is off
vertical, mercury switches trigger torque motors that move the
gyro position back to the correct position (air driven attitude
indicators use a different operating principle).

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Explain
The Uses and Applications of Tilt Switch

Thermostat

Mercury switches were once common in bimetal thermostats.


The weight of the movable mercury drop provided some hysteresis
by a degree of over-center action. The bimetal spring had to move
further to overcome the weight of the mercury, tending to hold it in
the open or closed position. The mercury also provided positive on-
off switching, and could withstand millions of cycles without
contact degradation.
TechFactors Copyright 2020
Lesson 14: Tilt Switch

Explain
The Uses and Applications of Tilt Switch

Doorbells

Some old doorbells, for example, the Soviet ZM-1U4, use


mercury switches as current interrupters.

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Explain
The Uses and Applications of Tilt Switch

Vending Machines

Mercury switches are still used in electro-mechanical systems


where physical orientation of actuators or rotors is a factor. They
are also commonly used in vending machines for tilt alarms that
detect when someone tries to rock or tilt the machine to make it
vend a product.

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Explain
The Uses and Applications of Tilt Switch

Bombs

A tilt switch can trigger a bomb. Mercury tilt switches can be


found in some bomb and landmine fuses, typically in the form of
anti-handling devices, for example, a variant of the VS-50 mine.

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Elaborate
To what fields can you apply the concept of tilt switch? How tilt
switches can be used in the following fields?

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Elaborate – Answer Keys


To what fields can you apply the concept of tilt switch? How tilt
switches can be used in the following fields?

Industrial Vehicles Satellites


Machines

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Evaluate
Activity 1: Enumerate the uses, features and safety measures in
handling a tilt or mercury switch. Use the image below as your guide.
Features and Safety Measures in
Structure of Tilt Handling Tilt
Switch Switch

Uses and Applications of Tilt Switch

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Evaluate – Answer Keys


Activity 1: Enumerate the uses, features and safety measures in
handling a tilt or mercury switch. Use the image below as your guide.
Features and Safety Measures in
Structure of Tilt Handling Tilt
Switch Switch
They are Do not keep
digital excess mercury
sensors which – purchase only
Uses and Applications of Tilt Switch amounts that
only turn will be
on/off Mercury tilt switches can be found completely
by tilting to in some bomb and landmine fuses, used. Never use
one side and typically in the form of anti- a mercury
handling devices, for example, a thermometer in
the other. variant of the VS-50 mine. TechFactors Copyright 2020
a laboratory
Lesson 14: Tilt Switch

Evaluate
Activity 2: Answer the given questions:

1. What element (substance) is used in a tilt switch?

2. Why do we have to handle a tilt switch with extra care?

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Evaluate – Answer Keys


Activity 2: Answer the given questions:

1. What element (substance) is used in a tilt switch?


Mercury

2. Why do we have to handle a tilt switch with extra care?


Mercury is very toxic.

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Additional Assessment
Describe each part of a tilt switch:

TechFactors Copyright 2020


Lesson 14: Tilt Switch

Additional Assessment – Answer Keys


Describe each part of a tilt switch:

ball bearing connects central


pin to metal case

central pin insulated from metal case

outer pin connected to metal case

TechFactors Copyright 2020


Working with
Tilt Switch
Module 3 Lesson 15
Lesson 15: Working with Tilt Switch

Target Outcomes

Design and control a tilt switch device using an LED.

TechFactors Copyright 2020


Lesson 15: Working with Tilt Switch

Engage
The Mystery Word
1. ATAAIAALAAT ASAAAWAAIAATACAAAH

2. QQQLQQQEQQAQQQD

3. MAIACAARAAOACAAOAANATRAOALAALAAEAARA

4. QQAQRQQDQQQUQQIQQQNQQO

5.AWAAEA ADAIAD AAIAAAT !


TechFactors Copyright 2020
Lesson 15: Working with Tilt Switch

Engage – Answer Keys


The Mystery Word
1. ATAAIAALAAT ASAAAWAAIAATACAAAH

2. QQQLQQQEQQAQQQD

3. MAIACAARAAOACAAOAANATRAOALAALAAEAARA

4. QQAQRQQDQQQUQQIQQQNQQO

5.AWAAEA ADAIAD AAIAAAT !


TechFactors Copyright 2020
Lesson 15: Working with Tilt Switch

Explore

TechFactors Copyright 2020


Lesson 15: Working with Tilt Switch

Explain

A tilt switch or sometimes referred to as “mercury switch” is a


sensor that detects inclination or orientation of the object and
accordingly gives its high or low output.

If used with LEDs, a tilt switch may be used to turn a device ON or


OFF whenever there’s a change in inclination or orientation.

TechFactors Copyright 2020


Lesson 15: Working with Tilt Switch

Elaborate
Draw a simple circuit. Apply the concept of tilt switch in your
illustrated circuit and explain your work.

TechFactors Copyright 2020


Lesson 15: Working with Tilt Switch

Evaluate
Activity 1: Tilt Switch with LED
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
2 pcs. 220Ω Resistors
1 PC Tilt switch
LED

TechFactors Copyright 2020


Lesson 15: Working with Tilt Switch

Evaluate – Answer Keys


int tpin = 7; delay (1000);
int led = 2; }
else {
void setup() { digitalWrite(led,
pinMode (led, OUTPUT); LOW);
pinMode (tpin, INPUT); delay (1000);
//Set pin 7 to input for reading the sensor. }
} }

void loop() {
if (digitalRead(tpin) == true) {
digitalWrite(led, HIGH);

TechFactors Copyright 2020


Lesson 15: Working with Tilt Switch

Additional Assessment

Based on the activity you have done, explain your experience on


what you have learned about tilt switch.

TechFactors Copyright 2020


Lesson 15: Working with Tilt Switch

Additional Assessment – Answer Keys

Based on the activity you have done, explain your experience on


what you have learned about tilt switch.

TechFactors Copyright 2020


Managing and
Adding Library
Module 3 Lesson 16
Lesson 16: Managing and Adding Library

Target Outcomes

Manage and add libraries to an Arduino IDE program.

TechFactors Copyright 2020


Lesson 16: Managing and Adding Library

Engage

TechFactors Copyright 2020


Lesson 16: Managing and Adding Library

Explore

Servo Library
attach() - Attach the Servo variable to a pin.
write() - Writes a value to the servo, controlling the shaft
accordingly.
writeMicroseconds() - Writes a value in microseconds (uS) to
the servo, controlling the shaft accordingly.
read() - Read the current angle of the servo (the value passed
to the last call to write().
attached() - Check whether the Servo variable is attached to a
pin.
detach() - Detach the Servo variable from its pin. TechFactors Copyright 2020
Lesson 16: Managing and Adding Library

Explore

SD Library
exists() - Tests whether a file or directory exists on the SD card.
mkdir() - Create a directory on the SD card.

TechFactors Copyright 2020


Lesson 16: Managing and Adding Library

Explain
Libraries are a collection of code that makes it easy for you to connect to a
sensor, display, module, etc.

It allows you to call functions that are already written. For example, the
Stepper Motor library contains all of the raw code to access the hardware, all
you need to do is initialize it and call the functions. A library does all the heavy
lifting so you can use your modules quickly and easily.

Through the use of libraries, the Arduino can be extended just like most
programming platforms. It provides extra functionality for use in working with
hardware or manipulating data.
TechFactors Copyright 2020
Lesson 16: Managing and Adding Library

Elaborate
Steps on How to Locate the Liquid Crystal Library
1. On the tool bar, navigate Sketch then click Include Library Menu.

TechFactors Copyright 2020


Lesson 16: Managing and Adding Library

Elaborate
Steps on How to Locate the Liquid Crystal Library
2. Click on Manage Library then choose Library Manager and the
following window will appear:

TechFactors Copyright 2020


Lesson 16: Managing and Adding Library

Elaborate
Steps on How to Locate the Liquid Crystal Library

You can then search by keyword for a library. For an example searched
for Stepper Motor. Once located it will now install into the library of your
Arduino directory and once it is all install completely into your Arduino directory
you can use it any time.

TechFactors Copyright 2020


Lesson 16: Managing and Adding Library

Elaborate
Another Steps on How to Locate the Liquid Crystal Library
1. On the tool bar navigate Sketch click Include Library then
choose Add .zip Library.

TechFactors Copyright 2020


Lesson 16: Managing and Adding Library

Elaborate
Another Steps on How to Locate the Liquid Crystal Library
2. Locate and select the .zip File that will be added to the
Arduino Directory and then click Open.

TechFactors Copyright 2020


Lesson 16: Managing and Adding Library

Elaborate
Another Steps on How to Locate the Liquid Crystal Library
3. Once done go to File click Example Menu then locate the
Added zip file you included.

TechFactors Copyright 2020


Lesson 16: Managing and Adding Library

Evaluate
Activity: LCD Display
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 220Ω Resistors
1 pc. Potentiometer
1 pc. 1602 LCD

TechFactors Copyright 2020


Lesson 16: Managing and Adding Library
void setup() {
//initialize LCD and set up the number of
Evaluate – Answer Keys columns //and rows:
lcd.begin(16, 2);
//create a new character
#include <LiquidCrystal.h> lcd.createChar(0, hearat);
//initialize the library with the numbers of the //create a new character
//interface pins lcd.createChar(1, smiley);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //create a new character
//make some custom characters: lcd.createChar(2, frownie);
byte heart[8] = {0b00000, 0b01010, 0b11111, 0b11111, //create a new character
0b11111, 0b01110, 0b00100, 0b00000}; lcd.createChar(3, armsDown);
byte smiley[8] = {0b00000, 0b00000, 0b01010, //create a new character
0b00000, 0b00000, 0b10001, 0b01110, 0b00000}; lcd.createChar(4, armsUp);
byte frown[8] = {0b00000, 0b00000, 0b01010, //Print a message to the lcd.
0b00000, 0b00000, 0b00000, 0b01110, 0b10001}; lcd.print("I ");
byte armsDown[8] = {0b00100, 0b01010, 0b00100, lcd.write(byte(0));
0b00100, 0b01110, 0b10101, 0b00100, 0b01010}; //when calling lcd.write() '0' must be cast as a
byte armsUp[8] = {0b00100, 0b01010, 0b00100, byte
0b10101, 0b01110, 0b00100, 0b00100, 0b01010}; lcd.print(" Arduino! ");
lcd.write((byte) 1); TechFactors Copyright 2020

}
Lesson 16: Managing and Adding Library

Evaluate – Answer Keys


void loop() {
//read the potentiometer on A0:
int sensorReading = analogRead(A0);
//map the result to 200 - 1000:
int delayTime = map(sensorReading, 0, 1023, 200, 1000);
//set the cursor to the bottom row, 5th position:
lcd.setCursor(4, 1);
//draw the little man, arms down:
lcd.write(3);
delay(delayTime);
lcd.setCursor(4, 1);
//draw him arms up:
lcd.write(4);
delay(delayTime);
}
TechFactors Copyright 2020
Lesson 16: Managing and Adding Library

Evaluate
Complete the table by keying in the correct code for the given
emoticons.

TechFactors Copyright 2020


Lesson 16: Managing and Adding Library

Evaluate – Answer Keys


Complete the table by keying in the correct code for the given
emoticons.

byte heart[8] byte byte Byte


={ frown[8] = armsDown[8] armsUp[8] =
0b00000, { 0b00000, = { 0b00100, { 0b00100,
0b01010, 0b00000, 0b01010, 0b01010,
0b11111, 0b01010, 0b00100, 0b00100,
0b11111, 0b00000, 0b00100, 0b10101,
0b11111, 0b00000, 0b01110, 0b01110,
0b01110, 0b00000, 0b10101, 0b00100,
0b00100, 0b01110, 0b00100, 0b00100,
0b00000 0b10001 0b01010 0b01010
}; }; }; };

TechFactors Copyright 2020


Lesson 16: Managing and Adding Library

Additional Assessment

Write an essay about each function of the SD Library and the Servo
Library.

TechFactors Copyright 2020


Lesson 16: Managing and Adding Library

Additional Assessment – Answer Keys

Write an essay about each function of the SD Library and the Servo
Library.

TechFactors Copyright 2020


LCD Display
Module 3 Lesson 17
Lesson 17: LCD Display

Target Outcomes

Compare 1602 LCD with different LCDs of televisions, projectors


and modern mobile phones;

Program the display output of an LCD Display.

TechFactors Copyright 2020


Lesson 17: LCD Display

Engage

TechFactors Copyright 2020


Lesson 17: LCD Display

Explain

1602 LCD (liquid crystal display) is


the technology used for displays in
notebook and other smaller computers.

1602 LCD is a basic 16 character by 2 line display. Black text on


Green/Blue background. Interface code is freely available. You will need
7 or 11 general I/O pins to interface to this LCD screen. Includes LED
backlight.
TechFactors Copyright 2020
Lesson 17: LCD Display

Explain

IIC I2C Interface Adapter Module is used


for 16×2 LCD Display. It uses the PCF8574T IC
chip which converts I2C serial data to parallel
data for the LCD display. Also this interface
module simplifies connecting an Arduino to a
16×2 Liquid Crystal display using only 4 wires.

TechFactors Copyright 2020


Lesson 17: LCD Display

Elaborate
The LCD Pinout Pin Symb Name Function
No. ol

TechFactors Copyright 2020


Lesson 17: LCD Display

Elaborate – Answer Keys


The LCD Pinout Pin Symb Name Function
No. ol
1 Vss Ground Ground pin connected to system ground
2 Vdd +5V Powers the LCD with +5V (4.7V – 5.3V)
3 VE Contrast V Decides the contrast level of display.
Register Connected to Microcontroller to shift
4
Select between command/data register
Used to read or write data. Normally
5 Read/Write
grounded to write data to LCD
Connected to Microcontroller Pin and
toggled
6 Enable
between 1 and 0 for data
acknowledgement
7-14 Data Pin 0-7 Data pins 0 to 7 forms a 8-bit data line.
15 LED+ LED Positive Backlight LED pin positive terminal
16 LED- LED Negative Backlight LED pin negative terminal

TechFactors Copyright 2020


Lesson 17: LCD Display

Evaluate
Activity 1: LCD Display (Hello World!)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 220Ω Resistors
1 pc. Potentiometer
1 pc. 1602 LCD

TechFactors Copyright 2020


Lesson 17: LCD Display

Evaluate - Answer Keys


#include <LiquidCrystal.h> delay(2000);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); lcd.clear();
//clear all characters
void setup() { //new characters
lcd.begin(16, 2); lcd.print("Arduino Projects");
lcd.print(" Hello World! "); lcd.setCursor(0, 1);
//words will display at first line lcd.print(" Training");
lcd.setCursor(0, 1); delay(2000);
lcd.print(" welcome "); lcd.clear();
//words will display second line }

TechFactors Copyright 2020


Lesson 17: LCD Display

Evaluate – Answer Keys


Activity 2: Answer the given question.

How does the 1602 LCD differ from the LCD of the televisions,
projectors, and modern mobile phones?

TechFactors Copyright 2020


Lesson 17: LCD Display

Additional Assessment

Using a 1602 LCD, create a program that will (1) show your first
name, (2) last name, and (3) your age.

TechFactors Copyright 2020


Lesson 17: LCD Display

Additional Assessment – Answer Keys

Using a 1602 LCD, create a program that will (1) show your first
name, (2) last name, and (3) your age.

TechFactors Copyright 2020


LCD Display and the
IIC I2C Adapter
Module
Module 3 Lesson 18
Lesson 18: LCD Display and the IIC I2C Adapter Module

Target Outcomes

Explain the functionality of a potentiometer in an LCD without


module that uses a breadboard.

TechFactors Copyright 2020


Lesson 18: LCD Display and the IIC I2C Adapter Module

Engage

TechFactors Copyright 2020


Lesson 18: LCD Display and the IIC I2C Adapter Module

Explore
Activity:
Materials:
I2C LCD adapter module
LCD display 16x2
Arduino Uno
Arduino IDE

Procedure: Make a connection from the LCD module to the Arduino board.
Set the hardware connections using the I2C adapter module. Connect the I2C
LCD adapter to LCD display by simply soldering the I2C adapter as shown in the
image. Then, connect the adapter to Uno as follows: Vcc to 5V, Gnd to Gnd, SDA
to A4, SCL to A5. TechFactors Copyright 2020
Lesson 18: LCD Display and the IIC I2C Adapter Module

Explore

What do you think is the main function of the I2C adapter module?

What do you noticed about the connections between Arduino and its LCD
display when using the I2C Module? Compare the number of connections in
normal LCD display and I2C LCD display.

Using a small screw, manipulate the blue color component (potentiometer).


What have you noticed?

TechFactors Copyright 2020


Lesson 18: LCD Display and the IIC I2C Adapter Module

Explain

When the I2C adapter module is not present, the connection should
be from the LCD module to the Arduino board. With I2C adapter
module, the LCD Module and Arduino should be connected through the
I2C Module.

The brightness on the LCD display can be adjusted using the


potentiometer in an LCD display without I2C adapter module.

TechFactors Copyright 2020


Lesson 18: LCD Display and the IIC I2C Adapter Module

Explain

I2C (I-square-C i.e. IIC) means inter-integrated communication


protocol. It is also known as 2 line protocol.

IC/I2C Interface Adapter Module is used for 16×2 LCD Display. It


uses the PCF8574T IC chip which converts I2C serial data to parallel
data for the LCD display. Also this interface module simplifies
connecting an Arduino to a 16×2 Liquid Crystal display using only 4
wires.

TechFactors Copyright 2020


Lesson 18: LCD Display and the IIC I2C Adapter Module

Explain

The black adapter uses the PCF8574T IC


chip which converts I2C serial data to parallel
data for the LCD display. The blue color Pin Configuration of I2C LCD Display
component is a potentiometer which is used
to adjust the brightness of the display.

The two wires are SDA and SCL which are


Serial Data and Serial Clock respectively.
The two I2C wires

TechFactors Copyright 2020


Lesson 18: LCD Display and the IIC I2C Adapter Module

Elaborate
Make a comparison on the circuit connections when we wire up the
LCD to Arduino without the I2C adapter and with the adapter.

TechFactors Copyright 2020


Lesson 18: LCD Display and the IIC I2C Adapter Module

Elaborate – Answer Keys


Make a comparison on the circuit connections when we wire up the
LCD to Arduino without the I2C adapter and with the adapter.

With I2C When the I2C


adapter module, the adapter module is
LCD Module and not present, the
Arduino should be connection should
connected through be from the LCD
the I2C Module. module to the
Arduino board.
TechFactors Copyright 2020
Lesson 18: LCD Display and the IIC I2C Adapter Module

Evaluate
Activity 1: LCD Display (Hello World!)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 1602 LCD with IIC
I2C Adapter Module

TechFactors Copyright 2020


Lesson 18: LCD Display and the IIC I2C Adapter Module

Evaluate – Answer Keys


#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
//set the LCD address to 0x27 for a 16 chars and 2 line display

void setup() {
lcd.init(); //initialize the lcd
lcd.backlight(); //open backlight
lcd.print(" Hello World! "); //words will display at first line
lcd.setCursor (0, 1);
lcd.print(" welcome "); //words will display second line
delay(2000);
}

TechFactors Copyright 2020


Lesson 18: LCD Display and the IIC I2C Adapter Module

Evaluate
Activity 2: Answer the given question.

How does 1602 LCD with IIC I2C Adapter Module differ from the
LCD of the televisions, projectors, and modern mobile phones?

TechFactors Copyright 2020


Lesson 18: LCD Display and the IIC I2C Adapter Module

Evaluate – Answer Keys


Activity 2: Answer the given question.

How does 1602 LCD with IIC I2C Adapter Module differ from the
LCD of the televisions, projectors, and modern mobile phones?
It uses the PCF8574T IC chip which converts I2C serial
data to parallel data for the LCD display.

TechFactors Copyright 2020


Lesson 18: LCD Display and the IIC I2C Adapter Module

Additional Assessment

Using the 1602 LCD with IIC I2C Adapter Module, create a program
that will show and replace “world” in “Hello world” with your pet’s
name.

TechFactors Copyright 2020


Lesson 18: LCD Display and the IIC I2C Adapter Module

Additional Assessment – Answer Keys

Using the 1602 LCD with IIC I2C Adapter Module, create a program
that will show and replace “world” in “Hello world” with your pet’s
name.

TechFactors Copyright 2020


Making the LCD
Characters Move
Module 3 Lesson 19
Lesson 19: Making the LCD Characters Move

Target Outcomes

Control displayed characters using 1602 LCD;

Display characters in a 1602 LCD and make it move from left to


right and vice versa; and

Determine codes used in LCD display.

TechFactors Copyright 2020


Lesson 19: Making the LCD Characters Move

Engage

TechFactors Copyright 2020


Lesson 19: Making the LCD Characters Move

Explore
Activity: Build Circuit
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
Arduino IDE
1 pc. 1602 LCD with IIC
I2C Adapter Module

TechFactors Copyright 2020


Lesson 19: Making the LCD Characters Move

Explore
Activity: Build Circuit
The Code

TechFactors Copyright 2020


Lesson 19: Making the LCD Characters Move

Explain

LCD with built in interface adapter module simplifies connection


using only 4 wires. The LCD module can be connected to an Arduino
board in two ways:

1. Direct connection from the LCD module to the Arduino board


2. LCD Module and Arduino board connected through an I2C Module

TechFactors Copyright 2020


Lesson 19: Making the LCD Characters Move

Elaborate
Extra Functions
These are almost all of the current methods that you’re able to
call for the Arduino LCD display:
Auto-scroll: Shift text right and left.
autoscroll(); This will move the text one space to the left
whenever a new character is added.
noAutoscroll(); Turns off auto scrolling.
Cursor: This allows you to turn off and on the underscore
cursor.
noCursor(); Turns off the underscore cursor.
Cursor(); Turns on the underscore cursor. TechFactors Copyright 2020
Lesson 19: Making the LCD Characters Move

Elaborate
Extra Functions
Blink: Turns on and off the blinking of the block cursor.
noBlink(); Turns off the blinking cursor.
blink(); Turns on the blinking cursor.
Display: Make the display go blank without losing the current
text.
noDisplay(); Turns off the display.
display(); Turns on the display.
Scroll: Allows you to scroll the text both left and right.
scrollDisplayLeft(); Will scroll one position to the left.
scrollDisplayRight(); Will scroll one position to the right.
TechFactors Copyright 2020
Lesson 19: Making the LCD Characters Move

Elaborate
Extra Functions
Serial Display: You can print the text sent through the serial port on
the screen.
write(Serial.read());
Set Cursor: Sets the cursor to a specific position. (Location, Line)
setCursor(0, 0); Will set the cursor to be at the top left.
setCursor(15, 1); Will set the cursor to be at the bottom right.
Text Direction: Allows you to tell which way the text should flow from
the
cursor.
rightToLeft(); Forces the text to flow from the left of the cursor.
leftToRight(); Forces the text to flow from the right of the cursor.
TechFactors Copyright 2020
Lesson 19: Making the LCD Characters Move

Evaluate
Activity 1: LCD Display (Serial Display)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 1602 LCD with IIC
I2C Adapter Module

TechFactors Copyright 2020


Lesson 19: Making the LCD Characters Move

Evaluate – Answer Keys


#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4); //clear the screen
lcd.clear();
void setup() { //read all the available characters
lcd.init(); while (Serial.available() > 0) {
//initialize the lcd //display each character to the
lcd.backlight(); LCD
Serial.begin(9600); lcd.write(Serial.read());
} }
}
void loop() { }
//when characters arrive over the serial port...
if (Serial.available()) {
// wait a bit for the entire message to arrive
delay(100);
TechFactors Copyright 2020
Lesson 19: Making the LCD Characters Move

Evaluate
Activity 2: LCD Display (Scroll Display)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 1602 LCD with IIC
I2C Adapter Module

TechFactors Copyright 2020


Lesson 19: Making the LCD Characters Move

Evaluate – Answer Keys


#include <LiquidCrystal_I2C.h> void loop() {
LiquidCrystal_I2C lcd(0x27,16,2); //scroll 13 positions (string length) to the left
//to move it offscreen left:
void setup() { for (int positionCounter = 0; positionCounter
lcd.init(); < 13;
//initialize the lcd positionCounter++) {
lcd.backlight(); //scroll one position left:
lcd.begin(16, 2); lcd.scrollDisplayLeft();
//Print a message to the LCD. //wait
lcd.print("hello, world!"); delay(150);
delay(1000); }
} }

TechFactors Copyright 2020


Lesson 19: Making the LCD Characters Move

Additional Assessment

Create a program that shows a popular quote using the moving


LCD from right to left.

TechFactors Copyright 2020


Lesson 19: Making the LCD Characters Move

Additional Assessment – Answer Keys

Create a program that shows a popular quote using the moving


LCD from right to left.

TechFactors Copyright 2020


Project:
Disappearing
Display
Module 3 Lesson 20
Lesson 20: Project: Disappearing Display

Target Outcomes

Determine the codes used in LCD display to make it blink.

TechFactors Copyright 2020


Lesson 20: Project: Disappearing Display

Engage
Activity: Staring Contest

TechFactors Copyright 2020


Lesson 20: Project: Disappearing Display

Explore
Study the other functions (Blink, cursor and display function) of the Liquid
Crystal I2C library below. Then try displaying your own name in the LCD. Apply
the following concepts for your work.
#include
<LiquidCrystal_I2C.h> void loop() {
Cursor lcd.cursor();
LiquidCrystal_I2C
cursor(); Displays the LCD lcd(0x27,20,4); delay(500);
cursor: an underscore (line) at the //Change to (0x27,16,2) for
position of the next character to be 16x2 LCD. lcd.noCursor();
delay(500);
printed. }
void setup() {
noCursor(); Hides the LCD cursor. lcd.init();
The following example creates a blinking lcd.backlight();
cursor at the end of “Hello World!”. lcd.print("Hello
World!");
TechFactors Copyright 2020
}
Lesson 20: Project: Disappearing Display

Explore #include <LiquidCrystal_I2C.h>


LiquidCrystal_I2C lcd(0x27,20,4);
//Change to (0x27,16,2) for 16x2
Blink LCD.
blink(); Creates a blinking block
void setup() {
style LCD cursor: a blinking rectangle
lcd.init();
at the position of the next character to lcd.backlight();
be printed. lcd.print("Hello World!");
noBlink(); Disables the block style }
LCD cursor. The following example
void loop() {
displays the blinking cursor for 5 seconds lcd.blink();
and then disables it for 2 seconds. delay(5000);
lcd.noBlink();
delay(2000);
}
TechFactors Copyright 2020
Lesson 20: Project: Disappearing Display

Explore #include <LiquidCrystal_I2C.h>


LiquidCrystal_I2C
lcd(0x27,20,4); //Change to
Display (0x27,16,2) for 16x2 LCD.
display(); This function turns on the
void setup() {
LCD screen and displays any text or
lcd.init();
cursors that have been printed to the lcd.backlight();
display. lcd.print("Hello World!");
noDisplay(); This function turns off }
any text or cursors printed to the LCD.
void loop() {
The text/data is not cleared from the lcd.display();
LCD memory. This means it will be shown delay(2000);
again when the function display() is called. lcd.noDisplay();
delay(2000);
}
TechFactors Copyright 2020
Lesson 20: Project: Disappearing Display

Explain

The LCD with no built-in interface adapter module uses a


breadboard that has a separate potentiometer and a much complex
connection.

An LCD with I2C adapter module connects through a bread board


and uses a separate potentiometer. The potentiometer can be used to
adjust the brightness on the LCD display to make it appear and
disappear.
TechFactors Copyright 2020
Lesson 20: Project: Disappearing Display

Elaborate
Activity:

Enumerate ways on how to fix a screen that blinks/flicker or


troubleshooting steps to help keep monitor flicker free.

TechFactors Copyright 2020


Lesson 20: Project: Disappearing Display

Evaluate
Activity 1: LCD Display (Blink and Line Cursor!)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 220Ω Resistors
1 pc. Potentiometer
1 pc. 1602 LCD

TechFactors Copyright 2020


Lesson 20: Project: Disappearing Display

Evaluate – Answer Keys lcd.print(" LCD


DISPLAY!");
lcd.print(" NO Blink ");
lcd.noBlink();
delay(2000); //Blink Off
#include <LiquidCrystal.h> lcd.clear(); delay (2000);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); } lcd.clear();
lcd.print(" Line Cursor ");
void setup() { void loop() { //Display Line Cursor at
lcd.begin(16, 2); lcd.print(" Hello "); the
lcd.print("Arduino Projects"); lcd.setCursor(0, 1); end of text
delay(2000); lcd.print(" World.. "); lcd.cursor();
lcd.clear(); delay (1000); //initialize cursor
lcd.setCursor(0, 0); lcd.clear(); delay (2000);
lcd.print(" SAMPLE"); lcd.print(" Blink cursor "); lcd.clear();
lcd.setCursor(0, 1); //Display Cursor at the lcd.print(" NO Line ");
lcd.print(" ACTIVITY "); end of text lcd.noCursor();
delay(2000); lcd.blink(); //Cursor Off
lcd.clear(); //initialize blink delay (2000);
lcd.setCursor(0, 0); delay (2000); lcd.clear();
lcd.clear(); } TechFactors Copyright 2020
Lesson 20: Project: Disappearing Display

Evaluate
Activity 2: LCD Display (Display _ No Display Text)
Material
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 220Ω Resistors
1 pc. Potentiometer
1 pc. 1602 LCD

TechFactors Copyright 2020


Lesson 20: Project: Disappearing Display

Evaluate – Answer Keys

#include <LiquidCrystal.h> void loop() {


LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //Turn off the display
void setup() { lcd.noDisplay();
//set up the LCD's number delay(500);
of columns and rows //Turn on the display:
lcd.begin(16, 2); lcd.display();
//Print a message to the LCD. delay(500);
lcd.print("hello, world!"); }
}

TechFactors Copyright 2020


Lesson 20: Project: Disappearing Display

Additional Assessment

Describe each function in disappearing display in LCD:

a. Cursor

b. Blink

c. Display

TechFactors Copyright 2020


Lesson 20: Project: Disappearing Display

Additional Assessment – Answer Keys

Describe each function in disappearing display in LCD:

a. Cursor – Displays and hides the LCD cursor.

b. Blink – Creates and disables the block style LCD


cursor.

c. Display – Turns on and off any text displayed on the


LCD.
TechFactors Copyright 2020
Combination
Project: RGB
Module +
LCD Display
Module 4 Lesson 21
Lesson 21: Combination Project: RGB Module + LCD Display

Target Outcomes

Create a project using RGB module with a display of Tri-color.

TechFactors Copyright 2020


Lesson 21: Combination Project: RGB Module + LCD Display

Engage

What are your observations?

If we set the brightness of all three LEDs


to be the same, what will be the resulting color?

If we turn off the blue LED, so that just the


red and green LEDs are the same brightness, what will be the resulting color?

How can we produce different colors?


TechFactors Copyright 2020
Lesson 21: Combination Project: RGB Module + LCD Display

Explore

Inside the RGB led, there are three more LED’s. So by changing the
brightness of these LED’s, we can obtain many other colors. To change
brightness of RGB LED, we can use the PWM pins of Arduino. The PWM
pins will give signal different duty cycles to the RGB LED to obtain
different colors.

TechFactors Copyright 2020


Lesson 21: Combination Project: RGB Module + LCD Display

Explore
Activity 1:
Students will set up in the circuit
diagram and program or key in the code
for this activity. Students will configure
various colors by playing with different
values. Let students configure colors
generated from combined PWM values on
the 3 LEDs. They will adjust the RGB LED to
change to different colors by assigning different
values of brightness levels to 3 primary colors
using the function analogWrite(value).

TechFactors Copyright 2020


Lesson 21: Combination Project: RGB Module + LCD Display

Explore
Activity 1:
COLOR RED GREEN BLUE
RED
GREEN
BLUE
YELLOW
ORANGE
VIOLET
RASPBERRY
TURQUOISE
WHITE
TechFactors Copyright 2020
Lesson 21: Combination Project: RGB Module + LCD Display

Explore – Answer Keys


Activity 1:
COLOR RED GREEN BLUE
RED 255 0 0
GREEN 0 255 0
BLUE 0 0 255
YELLOW 255 255 0
ORANGE 255 125 0
VIOLET 125 0 255
RASPBERRY 255 0 125
TURQUOISE 0 255 125
WHITE 255 255 255
TechFactors Copyright 2020
Lesson 21: Combination Project: RGB Module + LCD Display

Explore

What is an RGB Module? What does RGB stands for?

How do we generate different colors using the RGB LED?

How do we adjust the brightness of each LED?

TechFactors Copyright 2020


Lesson 21: Combination Project: RGB Module + LCD Display

Explain
An RGB LED is basically three LEDs’
in one. It has 4 leads, the red, green, blue
LED and the long lead in which all three LEDs
are connected through the same pin is the
common ground. The color can be controlled
based on the voltages you write to the different
control pins, they make a mixture and produce
several thousands of colors.

TechFactors Copyright 2020


Lesson 21: Combination Project: RGB Module + LCD Display

Explain
Two Types of RGB LEDS
Anode RGB LEDs -In a common anode RGB LED, the three
LEDs share a positive connection.
Common cathode RGB LEDs - all three LEDs share a
negative connection.

TechFactors Copyright 2020


Lesson 21: Combination Project: RGB Module + LCD Display

Elaborate

RGB LED module can be use with Arduino in three ways:


1. Change color automatically

2. Pushbutton and RGB LED

3. Potentiometer and RGB LED - set colors

TechFactors Copyright 2020


Lesson 21: Combination Project: RGB Module + LCD Display

Elaborate
Activity: In Between Colors
Using the same group of students, try the “in between colors”.
try mixing colors play around with a program that will independently
turn on and achieving the following colors. Program the Arduino and
RGB LED to display even more colors.
Cyan
Magenta
Yellow
Orange
Purple
TechFactors Copyright 2020
Lesson 21: Combination Project: RGB Module + LCD Display

Evaluate
Activity 1: RGB Module with LCD Display (Tri – Color Display)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
4 pcs. 220Ω Resistors
1 pc. Potentiometer
1 pc. 1602 LCD
1 pc. RGB Module

TechFactors Copyright 2020


Lesson 21: Combination Project: RGB Module + LCD Display

Evaluate – Answer Keys pinMode (RED_PIN, OUTPUT);


pinMode (GREEN_PIN, OUTPUT);
pinMode (BLUE_PIN, OUTPUT);
#include <LiquidCrystal.h> }
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void loop() {
int RED_PIN = 8; //Red (turn just the red LED on):
int GREEN_PIN = 9; digitalWrite(RED_PIN, HIGH);
int BLUE_PIN = 10; digitalWrite(GREEN_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
void setup() { lcd.print(" Color ");
//set up the LCD's number of columns and rows lcd.setCursor(0, 1);
lcd.begin(16, 2); lcd.print(" RED.. ");
//Print a message to the LCD delay (1000);
lcd.print(" TRI - COLORS!"); lcd.clear();
delay (1000); //Green (turn just the green LED on):
lcd.clear(); digitalWrite(RED_PIN, LOW);

TechFactors Copyright 2020


Lesson 21: Combination Project: RGB Module + LCD Display

Evaluate – Answer Keys


//Blue (turn just the blue LED on):
digitalWrite(GREEN_PIN, HIGH); digitalWrite(RED_PIN, LOW);
digitalWrite(BLUE_PIN, LOW); digitalWrite(GREEN_PIN, LOW);
lcd.print(" Color "); digitalWrite(BLUE_PIN, HIGH);
lcd.setCursor(0, 1); lcd.print(" Color ");
lcd.print(" GREEN.. "); lcd.setCursor(0, 1);
delay (1000); lcd.print(" BLUE.. ");
lcd.clear(); delay (1000);
lcd.clear();
}

TechFactors Copyright 2020


Lesson 21: Combination Project: RGB Module + LCD Display

Additional Assessment

Explain and write in a sheet of paper what is RGB and its two types.

TechFactors Copyright 2020


Lesson 21: Combination Project: RGB Module + LCD Display

Additional Assessment – Answer Keys

Explain and write in a sheet of paper what is RGB and its two types.

TechFactors Copyright 2020


Combination
Project: Tilt
Switch +
LCD Display
Module 4 Lesson 22
Lesson 22: Combination Project: Tilt Switch + LCD Display

Target Outcomes

Create a project using LCD display that can be manipulated using


a tilt switch.

TechFactors Copyright 2020


Lesson 22: Combination Project: Tilt Switch + LCD Display

Engage
1. What are tilt sensors?

2. What is the similarity of this type of switch to an electrical switch?

3. Enumerate applications of tilt switches.

4. How do this tilt sensors work?

5. If tilt switch are used with LEDs, what is the main function of a tilt switch?

TechFactors Copyright 2020


Lesson 22: Combination Project: Tilt Switch + LCD Display

Engage – Answer Keys


1. What are tilt sensors?

2. What is the similarity of this type of switch to an electrical switch?

3. Enumerate applications of tilt switches.

4. How do this tilt sensors work?

5. If tilt switch are used with LEDs, what is the main function of a tilt switch?

TechFactors Copyright 2020


Lesson 22: Combination Project: Tilt Switch + LCD Display

Explore
Think-Pair-Share.
What factors influence the functionality of tilt sensors?
Enumerate and explain its specification.

TechFactors Copyright 2020


Lesson 22: Combination Project: Tilt Switch + LCD Display

Explore
Think-Pair-Share.
Enumerate the different key applications of a tilt sensors

TechFactors Copyright 2020


Lesson 22: Combination Project: Tilt Switch + LCD Display

Explore
Think-Pair-Share.

What are the key benefits and advantages of tilt sensors?

TechFactors Copyright 2020


Lesson 22: Combination Project: Tilt Switch + LCD Display

Explain

The principle is of a tilt switch is very


simple. When the switch is tilted in a certain
angle, the ball inside rolls down and touches
the two contacts connected to the pins outside,
thus triggering circuits. Otherwise the ball will
stay away from the contacts, thus breaking
the circuits.

TechFactors Copyright 2020


Lesson 22: Combination Project: Tilt Switch + LCD Display

Explain

When the switch is tilted in the appropriate direction, the contacts


will be connected, tilting the switch the opposite direction causes the
metallic ball to move away from that set of contacts, thus breaking that
circuit.

TechFactors Copyright 2020


Lesson 22: Combination Project: Tilt Switch + LCD Display

Elaborate
Activity:

Write an essay, or a paragraph, describing how switches found on


common appliances in the home make those appliances more
functional, or easier to operate.

TechFactors Copyright 2020


Lesson 22: Combination Project: Tilt Switch + LCD Display

Evaluate
Activity 1: Tilt Switch with LCD Display
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 220Ω Resistor
1 pc. Tilt Switch
1 pc. I2C with LCD 1602

TechFactors Copyright 2020


Lesson 22: Combination Project: Tilt Switch + LCD Display

Evaluate – Answer Keys


#include <LiquidCrystal_I2C.h> if (digitalRead(tpin) == true) {
LiquidCrystal_I2C lcd(0x27,16,2); lcd.setCursor(0, 0);
lcd.print(" Tilted!");
int tpin = 7; delay (1000);
lcd.clear();
void setup() { }
lcd.init(); //initialize the lcd else {
lcd.backlight(); //open the backlight lcd.setCursor(0, 1);
pinMode (tpin, INPUT); lcd.print(" Upright!");
//Set pin 7 to input for reading the sensor delay (1000);
} lcd.clear();
}
void loop() { }
lcd.begin(16, 2);

TechFactors Copyright 2020


Lesson 22: Combination Project: Tilt Switch + LCD Display

Additional Assessment

Create a program using tilt switch that when you switch on, the
LCD will show a happy reaction and when you switch off, the LCD will
show a sad reaction.

TechFactors Copyright 2020


Lesson 22: Combination Project: Tilt Switch + LCD Display

Additional Assessment – Answer Keys

Create a program using tilt switch that when you switch on, the
LCD will show a happy reaction and when you switch off, the LCD will
show a sad reaction.

TechFactors Copyright 2020


Combination
Project: LCD
Display + LED
Module 4 Lesson 23
Lesson 23: Combination Project: LCD Display + LED

Target Outcomes

Create a project using LCD display with LED light.

TechFactors Copyright 2020


Lesson 23: Combination Project: LCD Display + LED

Engage
Activity 1
Solve the following to reveal words that you might encounter
during the lesson.
1. Microscope – scope + contact – act + roller =

2. Little – ittl + doll – oll =

3. Life – ife + chrome – hrome + dart – art =

4. Breath – th + lead – lea + blackboard – black =


TechFactors Copyright 2020
Lesson 23: Combination Project: LCD Display + LED

Engage - Answer Keys


Activity 1
Solve the following to reveal words that you might encounter
during the lesson.
1. Microscope – scope + contact – act + roller =
MICROCONTROLLER

2. Little – ittl + doll – oll = LED

3. Life – ife + chrome – hrome + dart – art = LCD

4. Breath – th + lead – lea + blackboard – black = BREADBOARD


TechFactors Copyright 2020
Lesson 23: Combination Project: LCD Display + LED

Engage
Activity 2: Bring Me

TechFactors Copyright 2020


Lesson 23: Combination Project: LCD Display + LED

Explain
Activity 3:

List down the steps on how these materials (microcontroller,


LED, LCD, Breadboard) work together.

TechFactors Copyright 2020


Lesson 23: Combination Project: LCD Display + LED

Elaborate

TechFactors Copyright 2020


Lesson 23: Combination Project: LCD Display + LED

Evaluate
Activity 1: LCD Display with LED Light
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
2 pcs. 220Ω Resistors
1 pc. I2C with LCD 1602
2 pcs. LED (Red and Green)

TechFactors Copyright 2020


Lesson 23: Combination Project: LCD Display + LED

Evaluate – Answer Keys void loop() {


lcd.begin(16, 2);
#include <LiquidCrystal_I2C.h> digitalWrite(LED_RED, HIGH);
LiquidCrystal_I2C lcd(0x27,16,2); digitalWrite(LED_GREEN,
LOW);
int LED_RED = 8; lcd.setCursor(0, 0);
int LED_GREEN = 13; lcd.print("RED LED ON");
delay(2000);
void setup() { lcd.clear();
lcd.init(); digitalWrite(LED_RED, LOW);
lcd.backlight(); digitalWrite(LED_GREEN,
pinMode(LED_RED, OUTPUT); HIGH);
pinMode(LED_GREEN, OUTPUT); lcd.setCursor(0, 1);
} lcd.print(" GREEN LED ON");
delay(2000);
lcd.clear(); TechFactors Copyright 2020
Lesson 23: Combination Project: LCD Display + LED

Evaluate – Answer Keys


digitalWrite(LED_RED, LOW);
digitalWrite(LED_GREEN, LOW);
lcd.setCursor(0, 0);
lcd.print(" BOTH LED OFF");
delay(2000);
lcd.clear();
digitalWrite(LED_RED, HIGH);
digitalWrite(LED_GREEN, HIGH);
lcd.setCursor(0, 1);
lcd.print(" BOTH LED ON");
delay(2000);
lcd.clear();
}
TechFactors Copyright 2020
Lesson 23: Combination Project: LCD Display + LED

Additional Assessment

Write in a sheet of paper on what are the different colors of LED


can be used in showing the display in an LCD.

TechFactors Copyright 2020


Lesson 23: Combination Project: LCD Display + LED

Additional Assessment – Answer Keys

Write in a sheet of paper on what are the different colors of LED


can be used in showing the display in an LCD.

TechFactors Copyright 2020


Combination
Project: Buzzer +
4 Digital Tube +
LED
Module 4 Lesson 24
Lesson 24: Combination Project: Buzzer + 4 Digital Tube + LED

Target Outcomes

Apply the concepts from the previous lessons to create a single


project.

Create a project that can count number per digit with tic sound
and flashing light

TechFactors Copyright 2020


Lesson 24: Combination Project: Buzzer + 4 Digital Tube + LED

Engage
Pass Me The Box

TechFactors Copyright 2020


Lesson 24: Combination Project: Buzzer + 4 Digital Tube + LED

Explore
Our Project

TechFactors Copyright 2020


Lesson 24: Combination Project: Buzzer + 4 Digital Tube + LED

Explain

Buzzer produces sound.

A 4 Digital Tube is a chip used to


form a 4-digit numerical display. It is also
sometimes called a “Digital Tube.”

LED emits different colors of light.

TechFactors Copyright 2020


Lesson 24: Combination Project: Buzzer + 4 Digital Tube + LED

Elaborate

Have you seen a digital counter?

How will you relate the lesson about combination project using 4
digital tube, LED, and buzzer in digital counter?

TechFactors Copyright 2020


Lesson 24: Combination Project: Buzzer + 4 Digital Tube + LED

Evaluate
Activity 1: Counting Number per Digit with TIC Sound and
Flashing Light
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
5 pc. 220Ω Resistors
1 pc. 4 Digital Tube
1 pc. Passive buzzer
1 pc. LED (Any Color)
TechFactors Copyright 2020
Lesson 24: Combination Project: Buzzer + 4 Digital Tube + LED

Evaluate – Answer Keys void setup() {


//set all the pins of the LED
#include <TimerOne.h> long n = 0; display as output
//n represents the value displayed pinMode(d1, OUTPUT);
int a = 2; on the LED display. For pinMode(d2, OUTPUT);
int b = 3; example, when n=0, 0000 is pinMode(d3, OUTPUT);
int c = 4; displayed. The maximum value is pinMode(d4, OUTPUT);
int d = 5; 9999. pinMode(a, OUTPUT);
int e = 6; int x = 100; pinMode(b, OUTPUT);
int f = 7; int del = 5; pinMode(c, OUTPUT);
int g = 8; //Set del as 5; the value is the pinMode(d, OUTPUT);
int d1 = 9; degree of fine tuning for the pinMode(e, OUTPUT);
int d2 = 10; clock pinMode(f, OUTPUT);
int d3 = 11; int count = 0; pinMode(g, OUTPUT);
int d4 = 12; //Set count=0. Here count is a pinMode(buzz, OUTPUT);
int buzz = 13; count value that increases pinMode(led, OUTPUT);
int led = 1; by 1 every 0.1 second, which Timer1.initialize(100000);
means 1 second is counted
TechFactors Copyright 2020
when the value is 10//
Lesson 24: Combination Project: Buzzer + 4 Digital Tube + LED

Evaluate – Answer Keys delay(del);//delay 5ms


clearLEDs(); //clear the 7-segment display screen
//set a timer of length 100000 pickDigit(1); //Light up 7-segment display d2
microseconds (or 0.1 sec – or pickNumber((n%1000)/100); //get the value of
10Hz => the led will blink 5x, hundred
5 cycles of on and off per second) delay(del);//delay 5ms
Timer1.attachInterrupt( add ); clearLEDs(); //clear the 7-segment display screen
//attach the service routine here pickDigit(2); //Light up 7-segment display d3
} pickNumber(n%100/10); //get the value of ten
delay(del);//delay 5ms
void loop() { clearLEDs(); //clear the 7-segment display screen
clearLEDs(); pickDigit(3);//Light up 7-segment display d4
//clear the 7-segment display screen pickNumber(n%10);//Get the value of single digit
pickDigit(0); delay(del);//delay 5ms
//Light up 7-segment display d1 }
pickNumber((n/1000));
// get the value of thousand void pickDigit(int x) {
//light up a 7-segment display
TechFactors Copyright 2020
Lesson 24: Combination Project: Buzzer + 4 Digital Tube + LED

Evaluate – Answer Keys


digitalWrite(d3, LOW); //Light d3 up
//The 7-segment LED display is a common cathode break;
one. So also use digitalWrite to set d1 as high default:
and the LED will go out digitalWrite(d4, LOW); //Light d4 up
digitalWrite(d1, HIGH); break;
digitalWrite(d2, HIGH); }
digitalWrite(d3, HIGH); }
digitalWrite(d4, HIGH);
switch(x) { //The function is to control the 7-segment LED
case 0: display to display numbers. Here x is the number
digitalWrite(d1, LOW);//Light d1 up to be displayed. It is an integer from 0 to 9
break;
case 1: void pickNumber(int x) {
digitalWrite(d2, LOW); //Light d2 up switch(x) {
break; default:
case 2: zero(); break;

TechFactors Copyright 2020


Lesson 24: Combination Project: Buzzer + 4 Digital Tube + LED
void zero() {
//the 7-segment led display
Evaluate – Answer Keys
eight();
0
digitalWrite(a, HIGH);
break; digitalWrite(b, HIGH);
case 1:
case 9: digitalWrite(c, HIGH);
one(); break;
nine(); digitalWrite(d, HIGH);
case 2:
break; digitalWrite(e, HIGH);
two(); break;
} digitalWrite(f, HIGH);
case 3:
} digitalWrite(g, LOW);
three(); break;
}
case 4:
void clearLEDs() {
four(); break;
//clear the 7-segment void one() {
case 5:
display screen //the 7-segment led display
five(); break;
digitalWrite(a, LOW); 1
case 6:
digitalWrite(b, LOW); digitalWrite(a, LOW);
six(); break;
digitalWrite(c, LOW); digitalWrite(b, HIGH);
case 7:
digitalWrite(d, LOW); digitalWrite(c, HIGH);
seven(); break;
digitalWrite(e, LOW); digitalWrite(d, LOW);
case 8:
digitalWrite(f, LOW); digitalWrite(e, LOW);
digitalWrite(g, LOW); digitalWrite(f, LOW);
TechFactors Copyright 2020

} digitalWrite(g, LOW);
Lesson 24: Combination Project: Buzzer + 4 Digital Tube + LED
void five() {
//the 7-segment led display
Evaluate – Answer Keys
digitalWrite(c, HIGH);
5
digitalWrite(a, HIGH);
digitalWrite(d, HIGH); digitalWrite(b, LOW);
void two() { digitalWrite(e, LOW); digitalWrite(c, HIGH);
//the 7-segment led display 2 digitalWrite(f, LOW); digitalWrite(d, HIGH);
digitalWrite(a, HIGH); digitalWrite(g, HIGH); digitalWrite(e, LOW);
digitalWrite(b, HIGH); } digitalWrite(f, HIGH);
digitalWrite(c, LOW);
digitalWrite(g, HIGH);
digitalWrite(d, HIGH); void four() { }
digitalWrite(e, HIGH); //the 7-segment led display
digitalWrite(f, LOW); 4 void six() {
digitalWrite(g, HIGH); digitalWrite(a, LOW); //the 7-segment led display
} digitalWrite(b, HIGH); 6
digitalWrite(c, HIGH); digitalWrite(a, HIGH);
void three() { digitalWrite(d, LOW); digitalWrite(b, LOW);
//the 7-segment led display 3 digitalWrite(e, LOW); digitalWrite(c, HIGH);
digitalWrite(a, HIGH); digitalWrite(f, HIGH); digitalWrite(d, HIGH);
digitalWrite(b, HIGH); digitalWrite(g, HIGH); digitalWrite(e, HIGH);
} digitalWrite(f, HIGH);
TechFactors Copyright 2020
digitalWrite(g, HIGH);
Lesson 24: Combination Project: Buzzer + 4 Digital Tube + LED

Evaluate – Answer Keys


digitalWrite(c, HIGH); void add() {
void seven() { digitalWrite(d, HIGH); count ++;
//the 7-segment led display 7 digitalWrite(e, HIGH); if (count == 10) {
digitalWrite(a, HIGH); digitalWrite(f, HIGH); count = 0;
digitalWrite(b, HIGH); digitalWrite(g, HIGH); n++;
digitalWrite(c, HIGH); } digitalWrite(buzz,
digitalWrite(d, LOW); HIGH);
digitalWrite(e, LOW); void nine() { digitalWrite(led, HIGH);
digitalWrite(f, LOW); //the 7-segment led display delay(50);
digitalWrite(g, LOW); 9 digitalWrite(buzz, LOW);
} digitalWrite(a, HIGH); digitalWrite(led, LOW);
digitalWrite(b, HIGH); delay(50);
void eight() { digitalWrite(c, HIGH); if (n == 10000) {
//the 7-segment led display 8 digitalWrite(d, HIGH); n = 0;
digitalWrite(a, HIGH); digitalWrite(e, LOW); }
digitalWrite(b, HIGH); digitalWrite(f, HIGH); }
digitalWrite(g, HIGH); }
} TechFactors Copyright 2020
Lesson 24: Combination Project: Buzzer + 4 Digital Tube + LED

Additional Assessment

Differentiate each of the following:

a. Buzzer

b. 4 Digital Tube

c. LED

TechFactors Copyright 2020


Lesson 24: Combination Project: Buzzer + 4 Digital Tube + LED

Additional Assessment – Answer Keys

Differentiate each of the following:

a. Buzzer – Buzzer produces sound.

b. 4 Digital Tube – It is used to form a 4-digit numerical


display.

c. LED – LED emits different colors of light.

TechFactors Copyright 2020


-- E N D --

You might also like