You are on page 1of 21

Basic Embedded Systems Course

Training & Development Department


training@uruktech.com
 Introduction to the Arduino.
 Data Types in Arduino
 Voltage Level in Arduino
 Program Structure in Arduino
 Operating an LED
 Digital Mode in Arduino
 Delay in Arduino
 Blinking LED
 Blinking Two LEDs

Training & Development Department


training@uruktech.com
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, publishing something online. You can tell your board
what to do by sending a set of instructions to the microcontroller on the
board.

Training & Development Department


training@uruktech.com
Training & Development Department
training@uruktech.com
The open-source Arduino
Software (IDE) makes it easy
to write code and upload it to
the board. It runs on
Windows, Mac OS X, and
Linux. The environment is
written in Java and based on
Processing and other open-
source software.

Training & Development Department


training@uruktech.com
Training & Development Department
training@uruktech.com
Training & Development Department
training@uruktech.com
Training & Development Department
training@uruktech.com
A majority of systems we use rely on 5 V TTL Logic Levels. TTL is an
acronym for Transistor-Transistor Logic.

For any logic family, there are a number of threshold voltage levels to
know.
Training & Development Department
training@uruktech.com
VOH – Minimum OUTPUT Voltage level a TTL device will provide for
a HIGH signal.

VIH – Minimum INPUT Voltage level to be considered a HIGH.

VOL – Maximum OUTPUT Voltage level a device will provide for a


LOW signal.

VIL – Maximum INPUT Voltage level to still be considered a LOW.

The most noticeable difference is that the invalid region of voltages


is only between 1.5 V and 3.0 V

Training & Development Department


training@uruktech.com
Initializations (definitions)

Program Settings

Main Program

Training & Development Department


training@uruktech.com
Training & Development Department
training@uruktech.com
5V
from Arduino or any other source

≈3V

≈2V

Training & Development Department


training@uruktech.com
You can set the mode of any Pin by using the following command:

Syntax:

pinMode(pin, mode)

Parameters:
pin: the Pin number whose mode you wish to set
mode: INPUT or OUTPUT

Training & Development Department


training@uruktech.com
You can set the value (sending logic value) of any Pin by using the following
command:

Syntax:
digitalWrite(pin, value)

Parameters:
pin: the Pin number whose mode you wish to set
value: HIGH or LOW

Training & Development Department


training@uruktech.com
You can delay the program flow by using the following command:

Syntax:

delay(value)

Parameters:
value: the number of milliseconds to pause

Training & Development Department


training@uruktech.com
Training & Development Department
training@uruktech.com
Program Code (without initializing):

Training & Development Department


training@uruktech.com
Program Code (with initializing):

Training & Development Department


training@uruktech.com
Home Work !
Check the Assignments section in your Class

Training & Development Department


training@uruktech.com
Thank you …
Q&A

You might also like