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

Rob 1 Week 2

Uploaded by

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

Rob 1 Week 2

Uploaded by

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

Navigating

Arduino IDE
Navigating Arduino IDE
Target Outcomes:

At the end of the discussion, the students should be able to:

❑ Sketch code and

❑ Set-up the microcontroller board and the port settings.

TechFactors Copyright 2020


Navigating Arduino IDE

In this lesson the student will learn open source projects


like Arduino, lower the barrier of entry for developers that
are looking to experiment with interactive objects. This will
create an opportunity for a new wave of energy and
startups in creating the Internet of things. These
innovators will be able to rapidly prototype and experiment
with interactive devices by using the Arduino platform
simply by learning to set up microcontrollers and port
setting.

TechFactors Copyright 2020


Navigating Arduino IDE
Watch a short video
clip.

https://youtu.be/dqDj7Q4WB5o
TechFactors Copyright 2020
Navigating Arduino IDE
INSTALLING THE IDE
STEP 1: Go to this link: https://www.arduino.cc/en/software

STEP 2: Under the download options, select the appropriate OS of


your device.
For windows, click the Win 10 and newer, 64 bits option
For Mac OS, click the version of your device.

TechFactors Copyright 2020


Navigating Arduino IDE
INSTALLING THE IDE

TechFactors Copyright 2020


Navigating Arduino IDE
INSTALLING THE IDE

STEP 3: Choose
JUST DOWNLOAD

TechFactors Copyright 2020


Navigating Arduino IDE
INSTALLING THE IDE

STEP 4: It will
prompt another page
but still,
Choose
JUST DOWNLOAD

TechFactors Copyright 2020


Navigating Arduino IDE
INSTALLING THE IDE
STEP 5: Check your recent downloads, then click the arduino exe file
STEP 6: Run the file and make sure all files have been downloaded

TechFactors Copyright 2020


Navigating Arduino IDE
INSTALLING THE IDE
Once you see this
interface, you have
successfully downloaded
the Arduino IDE.

Congratulations!

TechFactors Copyright 2020


Navigating Arduino IDE

TechFactors Copyright 2020


Navigating Arduino IDE

TechFactors Copyright 2020


Navigating Arduino IDE

TechFactors Copyright 2020


Navigating Arduino IDE
The Arduino is a powerful prototyping tool for many
reasons, including its lack of a dedicated programmer,
its wide range of available libraries, and the simplicity
of its IDE. While we only got a light to blink in this
project, you can expect much more in the future. Try
your hand at interfacing with displays, taking
measurements, talking over the Internet, and possibly
even working with AI!

TechFactors Copyright 2020


Navigating Arduino IDE
❑ Arduino IDE is an open source software that is mainly used for
writing and compiling the code into the Arduino Module.

❑ It is an official Arduino software, making code compilation too


easy that even a common person with no prior technical
knowledge can get their feet wet with the learning process.

❑ It is easily available for operating systems like MAC, Windows,


Linux and runs on the Java Platform that comes with inbuilt
functions and commands that play a vital role for debugging,
editing and compiling the code in the environment.

TechFactors Copyright 2020


Navigating Arduino IDE
❑ A range of Arduino modules available including Arduino Uno, Arduino
Mega, Arduino Leonardo, Arduino Micro and many more.

❑ Each of them contains a microcontroller on the board that is


actually programmed and accepts the information in the form of code.

❑ The main code, also known as a sketch, created on the IDE platform will
ultimately generate a Hex File which is then transferred and uploaded in
the controller on the board.

❑ The IDE environment mainly contains two basic parts: Editor and Compiler
where former is used for writing the required code and later is used for
compiling and uploading the code into the given Arduino Module.

❑ This environment supports both C and C++ languages.


TechFactors Copyright 2020
Navigating Arduino IDE
Follow the set up in the schematic diagram and key in the code for this activity.

1. Open your Arduino software and carefully type in the code:

TechFactors Copyright 2020


Navigating Arduino IDE
2. Be sure you have capitalized “Serial” both times, or the sketch will
not work.

3. Also, notice in the figure that the sketch uses parentheses () and
curly braces {}. Be sure to use the right ones in the right places!

4. Click the Verify button to make sure your code does not have any
typing errors.
TechFactors Copyright 2020
Lesson 4: Navigating Arduino IDE
5. Look for the“Binary sketch size” text in the message pane.

6. If it is there, your code is compiled and is ready for upload to the


Arduino.

7. If there is a list of errors, it is trying to tell you it can not compile


your code. Find the typing mistake and fix it!

8. Click the Upload button. The status line under your code will
display “Compiling sketch...,” “Uploading...,” and then “Done TechFactors Copyright 2020
Lesson 4: Navigating Arduino IDE

TechFactors Copyright 2020


Lesson 4: Navigating Arduino IDE

9. After the sketch is done uploading, click the Serial Monitor


button.

10. If the Hello message does not display as soon as the Serial
Monitor window opens, check for the “9600 baud” setting in the
lower right corner of the monitor.

11. Use File → Save to save your sketch. Give it the name
HelloMessage.
TechFactors Copyright 2020
Navigating
TINKERCAD
Navigating TINKERCAD

https://www.canva.com/design/DAGNWHaIr9g/2nkXEwqfTGe5aDdCWz2gpQ/edit?utm_content
=DAGNWHaIr9g&utm_campaign=designshare&utm_medium=link2&utm_source=sharebutton

TechFactors Copyright 2020


Algorithm &
Flowchart
Algorithm & Flowchart
Learning Objectives:

At the end of this lesson, the students should be able to:’

❑ Enumerate steps in the programming cycle

❑ Identify IPO using a set of computing problems

TechFactors Copyright 2020


Algorithm & Flowchart
TOPIC 1: THE PROGRAMMING CYCLE
❑ The computer basically is a problem solving tool. Once it is
provided with a valid program, the computer becomes
self-operational, that is, it requires no human intervention during
processing.

❑ The program development life cycle is a set of steps or phases that


are used to develop a program in any programming language.

TechFactors Copyright 2020


Algorithm & Flowchart
TOPIC 1: THE
PROGRAMMING CYCLE

TechFactors Copyright 2020


Algorithm & Flowchart
1: Problem Definition
❑ In this phase, we define the problem
statement and we decide the boundaries
of the problem.
❑ In this phase we need to understand the
problem statement, what is our
requirement, what should be the output
of the problem solution.
❑ These are defined in this first phase of
the program development life cycle.
TechFactors Copyright 2020
Algorithm & Flowchart
IPO ‘Input-Process-Output’
❑ The input–process–output (IPO) model is a widely used approach in
systems analysis and software engineering for describing the
structure of an information
❑ Processing program or another process. Many introductory
programming and systems analysis texts introduce this as the most
basic structure for describing a process.

TechFactors Copyright 2020


Algorithm & Flowchart
Example ‘Input-Process-Output’
❑ Write a program that reads in radius of a circle, computes the area
of circle using the formula A=πr2 , and then display the area of
circle.
❑ To define the problem, therefore the following are identified:
I - Radius of the circle
P - Compute the area of a circle using the formula A=πr2
O - Display the area of the circle

TechFactors Copyright 2020


TechFactors Copyright 2020
Algorithm & Flowchart
2: Problem Analysis
❑ In phase 2, we determine the
requirements like variables, functions, etc.
to solve the problem.
❑ That means we gather the required
resources to solve the problem defined in
the problem definition phase.
❑ We also determine the bounds of the
solution.

TechFactors Copyright 2020


Algorithm & Flowchart
3: Algorithm Development
❑ During this phase, we develop a step by
step procedure to solve the problem using
the specification given in the previous
phase. This phase is very important for
program development.
❑ That means we write the solution in step
by step statements.

TechFactors Copyright 2020


Algorithm & Flowchart
4: Coding & Documentation
❑ This phase uses a programming language
to write or implement the actual
programming instructions for the steps
defined in the previous phase.
❑ In this phase, we construct the actual
program.
❑ That means we write the program to
solve the given problem using
programming languages like C, C++, Java,
etc.,
TechFactors Copyright 2020
Algorithm & Flowchart
5: Testing & Debugging
❑ During this phase, we check whether the
code written in the previous step is
solving the specified problem or not.
❑ That means we test the program whether
it is solving the problem for various input
data values or not.
❑ We also test whether it is providing the
desired output or not.

TechFactors Copyright 2020


Algorithm & Flowchart
6: Maintenance
❑ During this phase, the program is actively
used by the users. If any enhancements
found in this phase, all the phases are to be
repeated to make the enhancements.
❑ That means in this phase, the solution
(program) is used by the end-user.
❑ If the user encounters any problem or
wants any enhancement, then we need to
repeat all the phases from the starting, so
that the encountered problem is solved or
enhancement is added. TechFactors Copyright 2020
Algorithm & Flowchart
Types of Errors
1. SYNTAX ERROR
< An Error encountered during compilation process. A statement(s) in the source
code that does not follow the correct format Example: System.ot.println instead of
typing System.out.println(coding error)>

2. RUNTIME ERROR
< an error detected during execution of the source code >

3. LOGICAL ERROR
< An error encountered when the source code does solve the problem thus the
output of the program is not correct Example: 2+2 = 3; (it runs but did not do the
expected outcome. >
TechFactors Copyright 2020
Algorithm & Flowchart
ALGORITHM
❑ An algorithm is a set of step-by-step procedures, or a set of rules to
follow, for completing a specific task or solving a particular problem.
❑ The word algorithm was first coined in the 9th century. Algorithms
are all around us.
❑ Common examples include: the recipe for baking a cake, the method
we use to solve a long division problem, the process of doing laundry,
and the functionality of a search engine are all examples of an
algorithm.

TechFactors Copyright 2020


Algorithm & Flowchart
ALGORITHM
❑ Here’s what baking a cake might look like, written out as a list of
instructions, just like an algorithm:
1. Preheat the oven
2. Gather the ingredients
3. Measure out the ingredients
4. Mix together the ingredients to make the batter
5. Grease a pan
6. Pour the batter into the pan
7. Put the pan in the oven
8. Set a timer
9. When the timer goes off, take the pan out of the oven
10. Enjoy!
TechFactors Copyright 2020
Algorithm & Flowchart
ALGORITHM
❑ Just as how we did with the steps in making cake, computer
programming do this by creating an algorithm or steps on how to
create the program.

TechFactors Copyright 2020


Algorithm & Flowchart
FLOWCHART
❑ Flowchart is a graphical representation of an algorithm. Programmers
often use it as a program-planning tool to solve a problem.
❑ It makes use of symbols which are connected among them to indicate
the flow of information and processing.
❑ The process of drawing a flowchart for an algorithm is known as
“flowcharting”.

TechFactors Copyright 2020


Algorithm & Flowchart
Terminal(Stop/Start) Input/Output

Represents the start and the end Used for input and output
of a flowchart. operation.

TechFactors Copyright 2020


Algorithm & Flowchart
Flowlines Processing

Indicates the flow of logic by Used for arithmetic operations


connecting symbols. and data-manipulations.

TechFactors Copyright 2020


Algorithm & Flowchart
Decision On-page Connector

Used for decision making Used to join different flowline


between two or more
alternatives.
TechFactors Copyright 2020
Algorithm & Flowchart
Off-page Connector Predefined Process/Function

Used to connect the flowchart Represents a group of


portion on a different page. statements performing one
processing task.
TechFactors Copyright 2020
THANK
YOU
TechFactors Copyright 2020

You might also like