SlideShare a Scribd company logo
INTRODUCTION TO
ARDUINO
• Introduction:
1. What is Microcontroller?
2. What is Arduino?
3. Types of Arduino
4. Arduino Uno Board
5. Arduino Shields
6. What is Arduino used for?
7. What can Arduino do?
8. Why Arduino?
9. Input/output
10. Analog/digital
11. Sensor
12. Communication
• Programming structure:
1. Data types
2. Statement and operators.
3. Control statements [if, if…else, switch case]
4. Loop statement [while, for, do …while]
5. What is function?
6. What is Arduino Libraries
 Basic Process
 Arduino IDE
 Arduino Language Reference
 Technical Section [Handling Event Using the in-build millis() function]
 Questions???
Agenda
INTRODUCTION
www.starhub.com.ng
What is Microcontroller?
A small computer on a
single chip containing a
Central Processor Unit
(CPU), flash memory,
RAM and input/output
interface.
Used for control
purposes, and for data
analysis
Microchip
Atmel Intel
www.mikroe.com/chapters/view/1
What is Arduino?
 An open-source electronics platform based on easy-to-use
hardware (electronic board) and software (IDE). www.arduino.cc
A electronic board, with on-board regulated power supply, USB
port to communicate with PC, and an Atmel microcontroller chip.
Anyone can get the details of its design and modify it or make his
own.
Types of Arduino
Arduino Uno : 16MHz
Arduino Mega2560 : 16MHz Arduino Ethernet : 16MHz
Arduino Nano : 16MHz
LilyPad Arduino : 8MHz
Arduino Pro Mini
: 8 (3.3 V)/16
(5 V) MHz
Arduino MKR1000 : 48MHz Arduino 101 : 32MHz Arduino Zero : 48MHz
Arduino Due : 84MHz Arduino Yún : 16MHz and 400MHz
Types of Arduino
Arduino Leonardo : 16MHz
Arduino Pro : 16MHz
Arduino Fio : 8MHz
Arduino Mega ADK : 16MHz
Arduino Esplora : 16MHz Arduino Micro : 16MHz
Types of Arduino
Arduino Uno Board
Arduino Shields
Boards plugged on top of the Arduino PCB to extend its capacities.
What is Arduino used for?
Physical Computing projects / research
 Interactive Design
Rapid prototyping
What can Arduino do?
Sensors ( sense things)
 Push buttons, touch pads, tilt switches.
 Variable resistors (volume knob / sliders)
 Photo-resistors (light intensity)
 Thermistors (temperature)
 Ultrasound (proximity range finder)
Actuators ( do things)
• Lights, LED’s
• Motors
• Speakers
• Displays (LCD)
Why Arduino?
 It is Open Source, both in terms of Hardware and Software.
 It can communicate with a computer via serial connection over
USB.
 It can be powered from USB or standalone DC power.
 It can run standalone from a computer (chip is programmable)
and it has memory (a small amount).
 It can work with both Digital and Analog electronic signals.
Sensors and Actuators.
 You can build robots, drone, home automation, IoT application,
farm management system with Arduino.
Input/output
Examples: Buttons Switches, Light
Sensors, Flex Sensors, Humidity
Sensors, Temperature Sensors,
Photo-transistor, etc.
Examples: LEDs, DC motor, Servo
motor, Relay, Stepper motor, Piezo,
Buzzer, RGB LED, etc.
Input is a signal / information
going into the board.
Output is any signal exiting the
board.
Analog/digital
Digital signal are anything that can take specific levels of values with specific
offset between each other.
Ex: Square waves
Analog signal are anything that take value between its minimum value and
maximum value.
Ex: Temperature, Sine waves, etc.
Sensors
Devices that transforms the physical quantity in electrical value.
The physical quantity could be
Light
Heat
Motion
Moisture
Pressure
Temperature
Blood pressure
Humidity
Speed
And others environmental phenomena
Communication
Universal Asynchronous Receiver/Transmitter (UART): is a form of serial
communication because data is transmitted as sequential bits
Serial Peripheral Interface (SPI): is a master-slave model, where there is one
master device and multiple slave devices.
Inter-integrated circuit (I2C): it connect multiple masters to multiple slaves.
Hardware connection for
UART SPI multiple-slaves
connected to a single master
I2C hardware connection
ARDUINO
PROGRAMMING
STRUCTURE
www.starhub.com.ng
Data Types
Example:
Int i = 140; char c = ‘A’; long u = 234455; float f = 1.56;
unsigned int num = 454;
Statement and Operators
Statement represents a command, it ends with ‘;’
Example: int i;
i=49;
Operators are symbols that used to indicate a specific
function:
• Math operators: [+,-,*,/,%,^]
• Logic operators: [==, !=, &&, ||]
• Comparison operators: [==, >, <, !=, <=, >=]
Syntax:
• ‘;’ Semicolon (end statement)
• ‘{ }’ curly braces (block of statement)
• ‘//’ single line comment,
• /*Multi-line comments*/
Statement and Operators
Compound Operators:
• ++ (increment)
• -- (decrement)
• += (compound addition)
• -= (compound subtraction)
• *= (compound multiplication)
• /= (compound division)
Control Statements
If statement:
if(condition)
{
statements;
}
else if(condition2)
{
Statements;
}
Else{
statements;
}
Control Statements
Switch statement:
switch (x) {
case 1:
//do something when x equals 1
break;
case 2:
//do something when x equals 2
break;
default:
// if nothing else matches, do the default
// default is optional
}
Loop Statement
Do… while:
do
{
Statements;
}while(condition); // the statements are run at least once.
While:
While(condition)
{
statements;
}
for
for (int i=0; i <= var; i++){
statements;
}
What is functions?
A body of code designed to solve a particular
task.
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
What is Arduino Library?
Arduino environment can be extended through the use
of libraries.
Libraries provide extra functionality for use in sketches.
 Working with hardware
 Manipulating data.
A number of libraries come installed with the IDE.
 Download
 Create your own.
Basic Process
 Design the circuit:
o What are electrical requirements of the sensors or actuators?
o Identify inputs (analog inputs)
o Identify digital outputs
 Write the code
o Build incrementally
• Get the simplest piece to work first
• Add complexity and test at each stage
• Save and Backup frequently
o Use variables, not constants
o Comment explicitly
Arduino IDE
Download the Arduino IDE
(The program used to write code and
uploading it to arduino boards) from:
http://arduino.cc/en/Main/Software
Arduino Language Reference
http://arduino.cc/en/Reference/HomePage
Technical Session
Handling Multiple Event Using the Arduino in-build millis()
function:
Make a 4 LEDs to blink at different rate of 1 sec, 0.5 sec, 0.25 sec and 0.1sec in an
infinite loop.
Download the demo code from
https://github.com/emotexplanet/Arduino_Multiple_Event_with_millis_function
Questions???
?
Thank
You

More Related Content

What's hot (20)

PPTX
Introduction to Arduino
Omer Kilic
 
PPT
Arduino presentation by_warishusain
student
 
PPT
Intro to Arduino
avikdhupar
 
PPTX
Arduino Microcontroller
Shyam Mohan
 
PPT
Arduino
vipin7vj
 
PPTX
Wi-Fi Esp8266 nodemcu
creatjet3d labs
 
PPTX
Basics of arduino uno
Rahat Sood
 
PPTX
PPT ON Arduino
Ravi Phadtare
 
PPTX
Introduction to Node MCU
Amarjeetsingh Thakur
 
ODP
Introduction to Arduino
Richard Rixham
 
PPTX
Esp8266 NodeMCU
roadster43
 
PPTX
Introduction to Arduino
Green Moon Solutions
 
PDF
Arduino IDE
Mrunal Deshkar
 
PPS
What is Arduino ?
Niket Chandrawanshi
 
PDF
Introduction to Arduino Programming
James Lewis
 
PDF
Introduction to arduino
Jawaher Abdulwahab Fadhil
 
PPTX
Introduction to Arduino
Yong Heui Cho
 
PPTX
Introduction to arduino ppt main
eddy royappa
 
PPTX
Tinker cad intro
Archita Singh
 
Introduction to Arduino
Omer Kilic
 
Arduino presentation by_warishusain
student
 
Intro to Arduino
avikdhupar
 
Arduino Microcontroller
Shyam Mohan
 
Arduino
vipin7vj
 
Wi-Fi Esp8266 nodemcu
creatjet3d labs
 
Basics of arduino uno
Rahat Sood
 
PPT ON Arduino
Ravi Phadtare
 
Introduction to Node MCU
Amarjeetsingh Thakur
 
Introduction to Arduino
Richard Rixham
 
Esp8266 NodeMCU
roadster43
 
Introduction to Arduino
Green Moon Solutions
 
Arduino IDE
Mrunal Deshkar
 
What is Arduino ?
Niket Chandrawanshi
 
Introduction to Arduino Programming
James Lewis
 
Introduction to arduino
Jawaher Abdulwahab Fadhil
 
Introduction to Arduino
Yong Heui Cho
 
Introduction to arduino ppt main
eddy royappa
 
Tinker cad intro
Archita Singh
 

Similar to Introduction to Arduino Hardware and Programming (20)

PPT
Arduino_CSE ece ppt for working and principal of arduino.ppt
SAURABHKUMAR892774
 
PPTX
Chapter 5 Arduino Microcontroller Systems .pptx
khgh7
 
PDF
Introduction of Arduino Uno
Md. Nahidul Islam
 
PDF
Arduino microcontroller ins and outs with pin diagram
ArifatunNesa
 
PPTX
Introduction to Arduino session and basically it depends how you us and where...
YakshYadav2
 
PPTX
introductiontoarduino-130219180141-phpapp01.pptx
BEVARAVASUDEVAAP1813
 
PPTX
arduino and its introduction deep dive ppt.pptx
SruSru1
 
PDF
introductiontoarduino-111120102058-phpapp02.pdf
HebaEng
 
PDF
Arduino_IOT Arduino_IOT Arduino_IOTArdui
deepikayadav216323
 
PPTX
Introduction to the Arduino
Wingston
 
PPTX
ARDUINO Presentation1.pptx
SourabhSalunkhe10
 
PPTX
Arduino basics & programming skill development
ssuser478d0e
 
PPTX
Arduino Introduction PPT for school students
stusanthosh5195
 
PPTX
Introduction to arduino
Mohamed Essam
 
PDF
Syed IoT - module 5
Syed Mustafa
 
PDF
ARUDINO UNO and RasberryPi with Python
Jayanthi Kannan MK
 
PPT
Introduction to Arduino 16822775 (2).ppt
ansariparveen06
 
DOCX
Arduino PAPER ABOUT INTRODUCTION
NAGASAI547
 
PPSX
Arduino by yogesh t s'
tsyogesh46
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
SAURABHKUMAR892774
 
Chapter 5 Arduino Microcontroller Systems .pptx
khgh7
 
Introduction of Arduino Uno
Md. Nahidul Islam
 
Arduino microcontroller ins and outs with pin diagram
ArifatunNesa
 
Introduction to Arduino session and basically it depends how you us and where...
YakshYadav2
 
introductiontoarduino-130219180141-phpapp01.pptx
BEVARAVASUDEVAAP1813
 
arduino and its introduction deep dive ppt.pptx
SruSru1
 
introductiontoarduino-111120102058-phpapp02.pdf
HebaEng
 
Arduino_IOT Arduino_IOT Arduino_IOTArdui
deepikayadav216323
 
Introduction to the Arduino
Wingston
 
ARDUINO Presentation1.pptx
SourabhSalunkhe10
 
Arduino basics & programming skill development
ssuser478d0e
 
Arduino Introduction PPT for school students
stusanthosh5195
 
Introduction to arduino
Mohamed Essam
 
Syed IoT - module 5
Syed Mustafa
 
ARUDINO UNO and RasberryPi with Python
Jayanthi Kannan MK
 
Introduction to Arduino 16822775 (2).ppt
ansariparveen06
 
Arduino PAPER ABOUT INTRODUCTION
NAGASAI547
 
Arduino by yogesh t s'
tsyogesh46
 
Ad

Recently uploaded (20)

PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
PDF
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
DOCX
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
PPTX
Practical Applications of AI in Local Government
OnBoard
 
PDF
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
PDF
Next level data operations using Power Automate magic
Andries den Haan
 
PDF
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
PDF
Understanding AI Optimization AIO, LLMO, and GEO
CoDigital
 
PDF
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
PDF
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
PDF
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
 
PPTX
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
PDF
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
PDF
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
PDF
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
 
PDF
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
Practical Applications of AI in Local Government
OnBoard
 
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
Next level data operations using Power Automate magic
Andries den Haan
 
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
Understanding AI Optimization AIO, LLMO, and GEO
CoDigital
 
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
 
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
 
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
Ad

Introduction to Arduino Hardware and Programming

  • 2. • Introduction: 1. What is Microcontroller? 2. What is Arduino? 3. Types of Arduino 4. Arduino Uno Board 5. Arduino Shields 6. What is Arduino used for? 7. What can Arduino do? 8. Why Arduino? 9. Input/output 10. Analog/digital 11. Sensor 12. Communication • Programming structure: 1. Data types 2. Statement and operators. 3. Control statements [if, if…else, switch case] 4. Loop statement [while, for, do …while] 5. What is function? 6. What is Arduino Libraries  Basic Process  Arduino IDE  Arduino Language Reference  Technical Section [Handling Event Using the in-build millis() function]  Questions??? Agenda
  • 4. What is Microcontroller? A small computer on a single chip containing a Central Processor Unit (CPU), flash memory, RAM and input/output interface. Used for control purposes, and for data analysis Microchip Atmel Intel www.mikroe.com/chapters/view/1
  • 5. What is Arduino?  An open-source electronics platform based on easy-to-use hardware (electronic board) and software (IDE). www.arduino.cc A electronic board, with on-board regulated power supply, USB port to communicate with PC, and an Atmel microcontroller chip. Anyone can get the details of its design and modify it or make his own.
  • 6. Types of Arduino Arduino Uno : 16MHz Arduino Mega2560 : 16MHz Arduino Ethernet : 16MHz Arduino Nano : 16MHz LilyPad Arduino : 8MHz Arduino Pro Mini : 8 (3.3 V)/16 (5 V) MHz
  • 7. Arduino MKR1000 : 48MHz Arduino 101 : 32MHz Arduino Zero : 48MHz Arduino Due : 84MHz Arduino Yún : 16MHz and 400MHz Types of Arduino Arduino Leonardo : 16MHz
  • 8. Arduino Pro : 16MHz Arduino Fio : 8MHz Arduino Mega ADK : 16MHz Arduino Esplora : 16MHz Arduino Micro : 16MHz Types of Arduino
  • 10. Arduino Shields Boards plugged on top of the Arduino PCB to extend its capacities.
  • 11. What is Arduino used for? Physical Computing projects / research  Interactive Design Rapid prototyping
  • 12. What can Arduino do? Sensors ( sense things)  Push buttons, touch pads, tilt switches.  Variable resistors (volume knob / sliders)  Photo-resistors (light intensity)  Thermistors (temperature)  Ultrasound (proximity range finder) Actuators ( do things) • Lights, LED’s • Motors • Speakers • Displays (LCD)
  • 13. Why Arduino?  It is Open Source, both in terms of Hardware and Software.  It can communicate with a computer via serial connection over USB.  It can be powered from USB or standalone DC power.  It can run standalone from a computer (chip is programmable) and it has memory (a small amount).  It can work with both Digital and Analog electronic signals. Sensors and Actuators.  You can build robots, drone, home automation, IoT application, farm management system with Arduino.
  • 14. Input/output Examples: Buttons Switches, Light Sensors, Flex Sensors, Humidity Sensors, Temperature Sensors, Photo-transistor, etc. Examples: LEDs, DC motor, Servo motor, Relay, Stepper motor, Piezo, Buzzer, RGB LED, etc. Input is a signal / information going into the board. Output is any signal exiting the board.
  • 15. Analog/digital Digital signal are anything that can take specific levels of values with specific offset between each other. Ex: Square waves Analog signal are anything that take value between its minimum value and maximum value. Ex: Temperature, Sine waves, etc.
  • 16. Sensors Devices that transforms the physical quantity in electrical value. The physical quantity could be Light Heat Motion Moisture Pressure Temperature Blood pressure Humidity Speed And others environmental phenomena
  • 17. Communication Universal Asynchronous Receiver/Transmitter (UART): is a form of serial communication because data is transmitted as sequential bits Serial Peripheral Interface (SPI): is a master-slave model, where there is one master device and multiple slave devices. Inter-integrated circuit (I2C): it connect multiple masters to multiple slaves. Hardware connection for UART SPI multiple-slaves connected to a single master I2C hardware connection
  • 19. Data Types Example: Int i = 140; char c = ‘A’; long u = 234455; float f = 1.56; unsigned int num = 454;
  • 20. Statement and Operators Statement represents a command, it ends with ‘;’ Example: int i; i=49; Operators are symbols that used to indicate a specific function: • Math operators: [+,-,*,/,%,^] • Logic operators: [==, !=, &&, ||] • Comparison operators: [==, >, <, !=, <=, >=] Syntax: • ‘;’ Semicolon (end statement) • ‘{ }’ curly braces (block of statement) • ‘//’ single line comment, • /*Multi-line comments*/
  • 21. Statement and Operators Compound Operators: • ++ (increment) • -- (decrement) • += (compound addition) • -= (compound subtraction) • *= (compound multiplication) • /= (compound division)
  • 22. Control Statements If statement: if(condition) { statements; } else if(condition2) { Statements; } Else{ statements; }
  • 23. Control Statements Switch statement: switch (x) { case 1: //do something when x equals 1 break; case 2: //do something when x equals 2 break; default: // if nothing else matches, do the default // default is optional }
  • 24. Loop Statement Do… while: do { Statements; }while(condition); // the statements are run at least once. While: While(condition) { statements; } for for (int i=0; i <= var; i++){ statements; }
  • 25. What is functions? A body of code designed to solve a particular task. void setup() { // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: }
  • 26. What is Arduino Library? Arduino environment can be extended through the use of libraries. Libraries provide extra functionality for use in sketches.  Working with hardware  Manipulating data. A number of libraries come installed with the IDE.  Download  Create your own.
  • 27. Basic Process  Design the circuit: o What are electrical requirements of the sensors or actuators? o Identify inputs (analog inputs) o Identify digital outputs  Write the code o Build incrementally • Get the simplest piece to work first • Add complexity and test at each stage • Save and Backup frequently o Use variables, not constants o Comment explicitly
  • 28. Arduino IDE Download the Arduino IDE (The program used to write code and uploading it to arduino boards) from: http://arduino.cc/en/Main/Software
  • 30. Technical Session Handling Multiple Event Using the Arduino in-build millis() function: Make a 4 LEDs to blink at different rate of 1 sec, 0.5 sec, 0.25 sec and 0.1sec in an infinite loop. Download the demo code from https://github.com/emotexplanet/Arduino_Multiple_Event_with_millis_function