Lesson Plan 1 Cylcle 1 Computer Science
Lesson Plan 1 Cylcle 1 Computer Science
Day 1) Session:
Dr. Abraham HOD: Mrs. Carballo Computer Science 2 sessions 1J, 1C, 1H, 1N,
Elrington Flowers Dra. Seguro and Robotics 1S, 2N, 2H and
2S
Competency Area 1. Appreciation of the sacred nature of the human person and Character Development;
2. Emotional Intelligence and Effective Communication Skill;
3. Computer literacy;
4. Collaboration;
7. Understanding of and Advocacy for Sustainable Human Development.
Competency Rubrics
Previous Students with no prior Computer Science experience should have basic logical thinking, problem-solving skills,
Knowledge and a general understanding of everyday electronics like circuits. Familiarity with using a computer and
opening applications will help them navigate the Arduino IDE and understand basic concepts related to
programming, electronics, and Arduino components. No specific programming or coding knowledge is
required.
Content Session 2
Arduino For Beginners
What Is Arduino?
Because of it’s flexibility and low cost, Arduino has become a very popular choice for makers and makerspaces
looking to create interactive hardware projects.
Arduino was introduced back in 2005 in Italy by Massimo Banzi as a way for non engineers to have access to a
low cost, simple tool for creating hardware projects. Since the board is open-source, it is released under a
Creative Commons license which allows anyone to produce their own board.
If you search the web, you will find there are hundreds of Arduino compatible clones and variations available
but the only official boards have Arduino in it’s name. In the next section, we’re going to discuss a few of the
Arduino boards available and how they differ from each other.
Arduino is a great platform for prototyping projects and inventions but can be confusing when having to choose
the right board. If you’re brand new to this, you might have always thought that there was just one “Arduino”
board and that’s it. In reality, there are many variations of the official Arduino boards and then there are
hundreds more from competitors who offer clones. But don’t worry, we’re going to show you which one to start
with later on in this tutorial.
Below are a few examples of the different types of Arduino boards out there. The boards with the name
Arduino on them are the official boards but there are also a lot of really great clones on the market as well. One
of the best reasons to buy a clone is the fact they are generally less expensive than their official
Adafruit and Sparkfun for example, sell variations of the Arduino boards which cost less but still have the same
quality of the originals. One word of caution, be careful when buying boards from companies you don’t know
Arduino Uno
Board Breakdown
power supply.
Arduino Breadboard
Another very important item when working with Arduino is a solderless breadboard. This device allows you to
prototype your Arduino project without having to permanently solder the circuit together. Using a breadboard
allows you to create temporary prototypes and experiment with different circuit designs. Inside the holes (tie
points) of the plastic housing, are metal clips which are connected to each other by strips of conductive
material.
On a side note, the breadboard is not powered on its own and needs power brought to it from the Arduino board
using jumper wires. These wires are also used to form the circuit by connecting resistors, switches and other
components together.
Session 2
DEVELOPING A C++ PROGRAM
The following three steps are required to create and translate a C++ program:
1. First, a text editor is used to save the C++ program in a text file. In other words, the source code is saved to a
source file. In larger projects the programmer will normally use modular programming. This means that the
source code will be stored in several source files that are edited and translated separately.
2. The source file is put through a compiler for translation. If everything works as planned, an object file made
up of machine code is created. The object file is also referred to as a module
3. Finally, the linker combines the object file with other modules to form an executable file. These further
modules contain functions from standard libraries or parts of the program that have been compiled previously.
It is important to use the correct file extension for the source file’s name. Although the file extension depends
on the compiler you use, the most commonly found file extensions are .cpp and .cc. Prior to compilation, header
files, which are also referred to as include files, can be copied to the source file.
Header files are text files containing information needed by various source files, for example, type definitions
or declarations of variables and functions. Header files can have the file extension .h, but they may not have any
file extension.
The C++ standard library contains predefined and standardized functions that are available for any compiler.
Modern compilers normally offer an integrated software development environment, which combines the steps
mentioned previously into a single task. A graphical user interface is available for editing, compiling, linking,
and running the application. Moreover, additional tools, such as a debugger, can be launched.
A BEGINNER’S C++ PROGRAM
A C++ program is made up of objects with their accompanying member functions and global functions, which
do not belong to any single particular class. Each function fulfills its own particular task and can also call other
functions. You can create functions yourself or use ready-made functions from the standard library. You will
always need to write the global function main () yourself since it has a special role to play; in fact it is the main
program.
The short programming example on the opposite page demonstrates two of the most important elements of a C+
+ program. The program contains only the function main () and displays a message.
The first line begins with the number symbol, #, which indicates that the line is intended for the preprocessor.
The preprocessor is just one step in the first translation phase and no object code is created at this time. You can
type
#include
to have the preprocessor copy the quoted file to this position in the source code. This allows the program access
to all the information contained in the header file. The header file iostream comprises conventions for input and
output streams. The word stream indicates that the information involved will be treated as a flow of data.
Predefined names in C++ are to be found in the std (standard) namespace. The using directive allows direct
access to the names of the std namespace.
Program execution begins with the first instruction in function main(), and this is why each C++ program must
have a main function. The structure of the function is shown on the opposite page. Apart from the fact that the
name cannot be changed, this function’s structure is not different from that of any other C++ function.
In our example the function main () contains two statements. The first statement:
Learning Outcomes
Introduction Session 1: Introduction to Arduino
The teacher will commence the class by asking students, "What is Arduino?" Students will be given the
opportunity to answer. If no one provides an answer, the teacher will randomly select a student to respond.
Following the responses, the teacher will explain the concept of Arduino in their own terms. They will
introduce Arduino as an open-source programmable circuit board that allows users to create interactive
hardware projects. The teacher will then explain how Arduino can sense and control objects in the physical
world, interacting with outputs like LEDs, motors, and displays, setting the foundation for the session.
Development:
The teacher will explain the three key steps required to create and translate a C++ program:
1. Writing the source code in a text editor and saving it in a source file (.cpp or .cc).
2. Using a compiler to translate the source file into an object file (machine code).
3. Using a linker to combine the object file with other modules to form an executable program.
The teacher will emphasize the importance of using the correct file extensions and explain the role of
header files in the compilation process. A brief overview of the C++ standard library and its functions
will also be provided.
Activity:
Students will work individually to create a simple C++ program in a text editor that prints a message to
the console. They will:
1. Write the source code for a basic C++ program using the main() function.
2. Compile the program and check for any errors.
3. Use the linker to combine the program and create an executable file.
Each student will then run their program and display the output.
Closure Session 1
Closure
The teacher will summarize the importance of Arduino in creating interactive projects and encourage students
to think about how they can use Arduino in their own projects. The class will discuss possible future
applications of Arduino in technology.
Session 2
Closure
The teacher will review the steps of writing, compiling, and linking a C++ program and ask students to share
their experience with the activity. The session will conclude with a brief discussion on the importance of
modular programming in larger projects.
Conclusion Session 1: Conclusion – Introduction to Arduino
The teacher will summarize the key points covered, including the definition of Arduino, its components, and its
role in creating interactive hardware projects. Students will be reminded of Arduino's flexibility and
affordability, which make it a popular choice for various projects. The class will reflect on how Arduino can be
applied to different real-world projects, setting the foundation for further exploration in future sessions.
Evaluation
Strengths
Weakness