Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 46

The Standard Resistor Colour Code Chart Capacitor Colour/Number Code Table

Light-Emitting Diodes (LEDs) Diode 


WHERE TO USE
LOGIC, DATASHEET
Flowchart In Programming
Draw a flowchart to
add two numbers
entered by user.

Draw flowchart to find


the largest among
three different numbers
entered by user.
TOPIC 1:
INTRODUCTION TO
PROGRAMMING LANGUAGE,
EMBEDDED SYSTEM AND
ARDUINO
5 Basic Coding Concepts

1. Variables
As the foundation of any computer programming
language, variables act as “containers” that “hold”
information. These containers then store this information for
later use.

2. Data Structure
Data Structures are a specialized means of organizing and
storing data in computers in such a way that we can perform
operations on the stored data more efficiently.
3. Control Structure
A control structure analyzes variables and selects a direction in
which to go determined from the given parameters. For example,
when a computer program is running, the code is being read by the
computer line by line from top to bottom and (for the most
part) left to right. 

4. Syntax
Just like in the English language, computer programming follows
a syntax or a set of rules that define particular layouts of letters
and symbols. Proper syntax ensures the computer reads and
interprets code accurately.
5. Tools
In the physical world, tools allow workers to perform tasks that
would otherwise be extremely difficult (think of how a hammer
helps drive a nail into a piece of wood and what this job would be
like without tools). Similarly, a tool in computer programming is a
piece of software that helps programmers write code much faster. 
Overview of Embedded System

What is Embedded System?


An embedded system is a microprocessor-based computer hardware system with
software that is designed to perform a dedicated function, either as an
independent system or as a part of a large system. At the core is an integrated
circuit designed to carry out computation for real-time operations.
Overview of Embedded System

How an Embedded System Works?


Embedded systems are managed by microcontrollers or digital signal processors
(DSP), application-specific integrated circuits (ASIC), field-programmable gate
arrays (FPGA), GPU technology, and gate arrays. These processing systems are
integrated with components dedicated to handling electric and/or mechanical
interfacing.
Basic Structure of an Embedded System
• Sensor: The sensor measures and converts the physical quantity to an electrical
signal, which can then be read by an embedded systems engineer or any
electronic instrument. A sensor stores the measured quantity to the memory.

• A-D Converter: An analog-to-digital converter converts the analog signal sent


by the sensor into a digital signal.

• Processor & ASICs: Processors assess the data to measure the output and store
it to the memory.

• D-A Converter: A digital-to-analog converter changes the digital data fed by


the processor to analog data

• Actuator: An actuator compares the output given by the D-A Converter to the
actual output stored and stores the approved output.
Example of Embedded System

• Domestic appliances, such as dishwashers, TVs and digital phones.

• Digital Watches

• Electronic Calculator
What is Arduino?
• Arduino is an open-source electronics platform based on easy-to-use hardware and
software.

•  Arduino boards are able to read inputs - light on a sensor, a finger on a button

• Turn it into an output - activating a motor, turning on an LED

• You can tell your board what to do by sending a set of instructions to the microcontroller
on the board.
3 Things About Arduino
1) Arduino Hardware
• Physical component of Arduino which are Arduino
Boards
• It is printed circuit board and it is got some electronic
components on it
• There are many type of Arduino Boards such as
Arduino Nano, Uno and Mega
• There all have microcontroller on them
• The microcontroller is what enables us to read those
different Inputs, and control those different Outputs
3 Things About Arduino
2) Arduino Software
• Arduino IDE (Integrated Development Environment)
• Software Application downloaded onto your
computer and then use it to program the Arduino
boards
• Free software
• Arduino IDE is where you write your code before
upload into the Arduino boards
3 Things About Arduino
3) Arduino Code
• The code that you write inside the Arduino IDE is
ultimately what gets loaded onto the
microcontroller that’s on these Arduino boards.
• The Arduino code that you write is called a sketch.
• Arduino code itself is basically a derivative of the C
and C++ programming languages, but with some
Arduino-specific functions and structure.
Arduino Uno Board Pinout
Arduino Uno
Pin Category
Installing
Arduino IDE
•STEP 1: Download Arduino
IDE Software

- Select your software


which is compatible with
your operating system
(Windows, Linux or IOS)
- Link for download:
https://www.arduino.cc/
en/software
Installing
Arduino IDE
•STEP 2: Launch Arduino
IDE

- Unzip the folder


- Inside folder, find
application icon with an
infinity label
(application.exe)
- Double click the icon to
start the IDE
Installing
Arduino IDE
•STEP 3: Select Your
Arduino Board

- Select the correct


Arduino Board name,
which matches with the
board connected to your
computer
- Go to Tools > Board and
select your board
Installing
Arduino IDE
•STEP 4: Select Your Serial Port

- Go to Tools > Serial Port


- Likely COM3 or higher (COM1
and COM2 are usually
reserved for hardware serial
port)
- To find out, you can disconnect
your board and re-open the
menu, the entry disappears
should be of Arduino Board.
Installing
Arduino IDE

•STEP 5: Know the Function of each Symbol in the Arduino IDE Toolbar

A − Used to check if there is any compilation error.


B − Used to upload a program to the Arduino board.
C − Shortcut used to create a new sketch.
D − Used to directly open one of the example sketch.
E − Used to save your sketch.
F − Serial monitor used to receive serial data from the board and send the
serial data to the board.
TOPIC 2:
BASIC ELECTRONICS
COMPONENTS AND ARDUINO
IDE EXPLORATION
Basic Electronics Components
Jumper Wire  Breadboard 
Function: Jumper wires are electrical wires with Function: A breadboard (sometimes called a plugblock)
connector pins at each end. They are used to connect is used for building temporary circuits. It is useful to
two points in a circuit without soldering. designers because it allows components to be removed
and replaced easily. 
Basic Electronics Components
Resistor Potentiometer
Function: A resistor is an electrical component Function: A potentiometer is defined as a 3
that limits or regulates the flow of electrical terminal variable resistor in which the resistance is
current in an electronic circuit. manually varied to control the flow of electric
current.
Basic Electronics Components
Diode  Light-Emitting Diodes (LEDs)
Function: A diode is a semiconductor device that Function: A LED is a semiconductor device that emits
essentially acts as a one-way switch for current. It light when an electric current is passed through it.
allows current to flow easily in one direction.
Basic Electronics Components
Push Buttons Light Dependent Resistor (LDR)
Function: Push Buttons are normally-open tactile Function: An LDR is a component that has a
switches. Push buttons allow us to power the (variable) resistance that change with the light
circuit or make any particular connection only intensity that falls upon it.
when we press the button.
Basic Electronics Components
7 Segment
Function: A seven-segment display is a form of
electronic display device for displaying decimal
numerals that is an alternative to the more
complex dot matrix displays.

7 segment Code
Project 1 Schematic
Project 1(Sketch1):
Digital Output-LED
ON without Variable
•This sketch will light up LED
connected to Digital Pin 13
continuously without using
variable
Project 1(Sketch2):
Digital Output-LED
ON with Variable
•This sketch will light up LED
connected to Digital Pin 13
continuously by using variable
Project 1(Sketch3):
Digital Output-LED
OFF with Variable
•This sketch will turn OFF the
LED connected to Digital Pin 13
continuously by using variable
Project 1(Sketch4):
LED Blinking With
Time Delay
•This sketch Turns an LED ON
for one second, then OFF for
one second, repeatedly.
Project 2(Sketch5): Digital Output + Digital Input
•LED blinking with push button (Pull Down Connection)

Pull down circuit


Two Types of Button Connection

PULL DOWN CONNECTION PULL UP CONNECTION


(Input Port waiting HIGH) (Input Port waiting LOW)
TOPIC 3:
ANALOG INPUT
AND OUTPUT
Project 3(Sketch6): Analog Input with Serial Print
•This project will display Analog Input Value on Serial Monitor
Project 4(Sketch7): Analog Input + Digital Output
with Serial Print
•This project will control LED ON and OFF by using LDR
•LDR value displayed on Serial Monitor
Project 5(Sketch8): Analog Input + Analog Output
with Serial Print
•This project control LED brightness using potentiometer
•PWM value displayed on Serial Monitor

You might also like