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, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online.
2. Md.Nahidul Islam
EMBEDDED SYSTEM
An embedded system is a microprocessor- or microcontroller-
based system of hardware and software designed to perform
dedicated functions within a larger mechanical or electrical
system.
• Embedded system applications range from digital watches
and microwaves to hybrid vehicles and avionics.
• As much as 98 percent of all microprocessors manufactured
are used in embedded systems
An embedded system is a microcontroller and microprocessor based system which is designed to
performs Specific task.
Source: What is an Embedded System? Definition and FAQs | OmniSci
Fig: Block Diagram of a Embedded System
Environment
Sensors Clock
Operator
Controller
Software
Actuators Display
3. Md.Nahidul Islam
MICROPROCESSOR VS MICROCONTROLLER
• Microprocessor is the heart of Computer system.
• It is only a processor, so memory and I/O
components need to be connected externally.
• Cost of the entire system is high.
• It is mainly used in personal computers.
• Microprocessors are based on Von Neumann model.
• It's complex and expensive, with a large number of
instructions to process.
• Microprocessor-based systems can run at a very high
speed because of the technology involved.
• Micro Controller is the heart of an embedded system.
• Micro Controller has a processor along with internal
memory and I/O components.
• Cost of the entire system is low
• It is used mainly in a washing machine, MP3 players, and
embedded systems.
• Micro controllers arc based on Harvard architecture
• It's simple and inexpensive with less number of
instructions to process.
• Microcontroller based systems run up to 200MHz or more
depending on the architecture.
Source: Difference between Microprocessor and Microcontroller (guru99.com)
4. Md.Nahidul Islam
ARDUINO
Arduino is an open-source electronics platform based on easy-to-
use hardware and software.
• Arduino boards are relatively inexpensive compared to other
microcontroller platforms.
• The Arduino Software (IDE) runs on Windows, OSX, and Linux.
• The Arduino Software (IDE) is easy-to-use for beginners, yet
flexible enough for advanced users to take advantage of as well.
• The Arduino software is published as open source tools, available
for extension by experienced programmers.
• The language can be expanded through C++ libraries, and people
wanting to understand the technical details can make the leap
from Arduino to the AVR C programming language on which it's
based. Similarly, you can add AVR-C code directly into your
Arduino programs if you want to.
Source: https://www.arduino.cc/en/guide/introduction
It was in the year 2005 that the first
ever Arduino board was born in the
classrooms of the Interactive Design
Institute in Ivrea, Italy
5. Md.Nahidul Islam
TYPES OF ARDUINO BOARD
• Arduino Uno/R3
• Arduino Leonardo
• Arduino Due
• Arduino Yún
• Arduino Tre
• Arduino Micro Arduino Robot
• Arduino Esplora
• Arduino Mega
• Arduino Mini
• LilyPad Arduino
• Arduino Nano
• Arduino Fio
• Arduino Pro
• Arduino Ethernet
Arduino Uno Arduino Mega
Arduino Pro Mini
Arduino Nano
Arduino Leonardo
6. Md.Nahidul Islam
SOFTWARE (IDE)
The software used for programming Arduino is called the Integrated
Development Environment (IDE).
IDE is a Java application that works on many different platforms, including
PCs, Macs, and Linux systems.
It was developed for beginners who are not familiar with programming.
Includes a code editor, compiler, and uploader.
Symbol libraries for use of peripheral devices, such as serial ports and
various types of displays, are also included.
Arduino programs are called "sketches" and are written in a language very
similar to C or C ++
7. It is used to restart the
program from the first
line of it's sketch.
It is used to burn the program from
IDE, power the Arduino Uno & serial
communication to Serial.
It is used to general input output purpose. The board has 14
digital I/O pins (six capable of PWM output), 6 analog I/O pins
(A0-A5) It is used to analog-
to-digital (A/D) converter.
Dc Barrel Jack for 5~7v input 3.3v Output
5v Output
9. COMMUNICATION PROTOCOLS
A set of rules and regulations that allow two electronic devices to connect to exchange the data with one and another.
• Universal Asynchronous Reception and Transmission (UART)
Rx , Tx
• I2C Communication Protocols
The SPI (Serial Peripheral Interface) system setup is
relatively simple. Three pins are used for communicating
between a master and all slave devices:
• Shared/Serial Clock (SCLK)
• Master Out Slave In (MOSI)
• Master In Slave Out (MISO)
10. PROGRAMMING FUNCTIONS
Here are some of the most used functions in Arduino programming:
pinMode - Sets the pin mode to either INPUT or OUTPUT. pinMode(pin , mode);
analogRead - The analog voltage is read from the analog input terminal. analogRead(pin);
analogWrite - Writes an analog voltage to an analog output terminal. analogWrite(pin);
digitalRead - reads the value of the digital input pin. digitalRead(pin);
digitalWrite - sets the value of the digital output terminal to either HIGH or LOW. digitalWrite(pin ,value);
Serial.print - prints the data to the serial port as human-readable ASCII text.
delay- Pauses the program for the amount of time (in milliseconds) specified as parameter. delay(ms);
(There are 1000 milliseconds in a second.)
delayMicroseconds- Pauses the program for the amount of time (in microseconds). delayMicroseconds(us);
Source: https://www.arduino.cc/reference/en/#functions
11. PROGRAMMING LIBRARIES
Arduino libraries are sets of functions that allow you to control devices. Here are some of the most used libraries:
GPS library: An interrupt-based GPS library for no-parsing-required use.
LCD library : Those library allows an Arduino board to control various kinds of display.
Servo library: This library allows an Arduino board to control RC (hobby) servo motors
SD library: The SD library allows for reading from and writing to SD cards
Ethernet library: The library allows an Arduino board to connect to the Internet
Wi-Fi library: The library allows an Arduino board to connect to the Wi-Fi
Stepper library: This library allows you to control unipolar or bipolar stepper motors.
SPI library: Serial Peripheral Interface (SPI) is a synchronous serial data protocol used by microcontrollers for
communicating with one or more peripheral devices quickly over short distances
EEPROM library: The EEPROM library provides an easy to use interface to interact with the internal non-
volatile storage found on AVR based Arduino boards.
Software Serial library: The Software Serial library has been developed to allow serial communication on other
digital pins of the Arduino, using software to replicate the functionality
GSM library: With the Arduino GSM Shield, this library enables an Arduino board to do most of the operations
anyone can do with a GSM phone.
Sourec: https://www.arduino.cc/reference/en/libraries/
12. Md.Nahidul Islam
EX-01 LED BLYNKING
const int led1 = 13;
const int led2 = 10;
const int led3 = 6;
void setup()
{
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
}
void loop()
{
digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);
digitalWrite(led3, HIGH);
delay(1000); // Wait for 1000 millisecond(s)
digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
digitalWrite(led3, LOW);
delay(1000); // Wait for 1000 millisecond(s)
}
View this project
13. Md.Nahidul Islam
EX-2 LED FADE
//LED PWM FADEING EXAMPLE
//Md.Nahidul Islam
const int LED=9; // Define LED for Pin 9
void setup()
{
pinMode (LED, OUTPUT); // Set the LED pin as a
n output
}
void loop()
{
for (int i=0; i<256; i++){
analogWrite(LED, i);
delay(10);
}
for (int i=255; i>=0; i--){
analogWrite(LED, i);
delay(10);
}
} View this project
Writing a value of 0 with analogWrite()
indicates a square wave with a duty
cycle of 0 percent (always low).
Writing a 255 value indicates a square
wave with a duty cycle of 100
percent (always high).
Writing a 127 value indicates a square
with a duty cycle of 50 percent (high
half of the time, low half of the time).
14. Md.Nahidul Islam
EX-3 POT SERIAL MONITOR
int pot = A0;
int value = 0;
void setup()
{
pinMode(pot, INPUT);
Serial.begin(9600);
}
void loop()
{
value = analogRead(pot);
Serial.print(" THE POT VALUE ");
Serial.println(value);
}
View this project
15. Thank You
I am a hardworking and ambitious individual with a great
passion for the Microcontroller and Embedded System industry.
I am currently in my third year of studying B.Sc. In Electrical &
Electronic Engineering at United International University.