SlideShare a Scribd company logo
Introduction to Arduino
What is Arduino?
 Arduino is an open- source computer hardware and
software company, project and user community that
designs and manufactures microcontroller-based kits
for building systems consisting of digital devices,
interactive objects that can sense and control in the
physical world.
How to program Arduino?
 The Arduino Integrated Development Environment (IDE)
supports the C and C++ programming languages using
special rules of code organization.
 The Arduino IDE supplies a software library called
"Wiring" from the Wiring project, which provides many
common input and output procedures.
Arduino Products
Entry Level
Enhanced Features
Official Website:
https://www.arduino.cc/
ARDUINO UNO
Technical specifications:
 Microcontroller: Microchip ATmega328P
 Operating Voltage: 5 Volt
 Input Voltage: 7 to 20 Volts
 Digital I/O Pins: 14 (of which 6 provide PWM output)
 Analog Input Pins: 6
 DC Current per I/O Pin: 20 mA
 DC Current for 3.3V Pin: 50 mA
 Flash Memory: 32 KB of which 0.5 KB used
by bootloader
 SRAM: 2 KB
 EEPROM: 1 KB
 Clock Speed: 16 MHz
 Length: 68.6 mm
 Width: 53.4 mm
 Weight: 25 g
Program Structure
Setup( )
{
// A function that runs once at the start of a program and is used to
set //pinMode or initialize serial communication
}
loop( )
{
// This function includes the code to be executed continuously – reading
inputs, //triggering outputs, etc.
// This function is the core of all Arduino programs and does the bulk of
the //work.
}
Activity 1.1
Type : Team of 2 Duration : 15 Minutes
Use LED blink program from
example and upload it on the
ARDUINO board
Functions to handle digital I/O pinMode (pin, OUTPUT);
// make the digital pin either INPUT or OUTPUT
 digitalRead (pin);
//used to get the content on the pin which is
HIGH(1) or LOW(0)
 digitalWrite(pin, value)
//used to send HIGH(1) or LOW(0) value to a pin
Time Function
 delay(ms)
// waits for milli – seconds
/*….. Program to blink the LED on pin 13 …..*/
void setup( )
{
pinMode(13, OUTPUT); //Initialize the digital pin as output
}
void loop( )
{
digitalWrite(13, HIGH); // Turn the LED ON
delay(1000); // Wait for one second
digitalWrite(13, LOW); // Turn the LED OFF
delay(1000); // Wait for one second
}
Activity 1.2
Type : Team of 2 Duration : 10 Minutes
Modify the program to blink LED every 2
sec on pin 12.
Circuit for the LED
Cathode of
LED
Anode of LED
/*….. Program to blink the LED every 2 second on pin12*/
void setup( )
{
pinMode(12, OUTPUT); //Initialize the digital pin as output
}
void loop( )
{
digitalWrite(12, HIGH); // Turn the LED ON
delay(2000); // Wait for a two second
digitalWrite(12, LOW); // Turn the LED OFF
delay(2000); // Wait for a two second
}
Activity 1.3
Type : Team of 2 Duration : 15 Minutes
Modify the program to display the LED
state every 2 sec on Serial Monitor.
Serial communication with
ArduinoWhat is serial communication ?
The word serial means "one after the other."
 What is Baud rate ?
Number of symbols transferred per sec
Serial Display Functions
 Serial.begin(baud_rate)
//baud rate(characters per sec) between computer and
board is typically 9600 although you can work with
other speeds by changing settings of COM Port
 Serial.print(value),
//value could be any data and even string
 Serial.println(value)
//print in new line
Eg. Print INDIA on serial monitor
void setup( )
{
Serial.begin(9600);// 9600 is default baud rate of serial com
port of a computer
}
void loop( )
{
Serial.println(“INDIA”); // Send the value “INDIA”
}
Serial Monitor
/*….. Modify the program to blink on pin12 and display the LED state every 2 sec
on Serial Monitor…..*/
void setup( )
{
pinMode(12, OUTPUT); //Initialize the digital pin as output
Serial.begin(9600);
}
void loop( )
{
digitalWrite(12, HIGH); // Turn the LED ON
Serial.println(“ON”); // Send the value “ON”
delay(2000); // Wait for a second
digitalWrite(12, LOW); // Turn the LED OFF
Serial.println(“OFF”); // Send the value “OFF”
delay(2000); // Wait for a second
}
Activity 1.4
Type : Team of 2 Duration : 25 Minutes
Modify the program to blink 10 times
per loop iteration and display no. of
loop iterations on serial monitor.
Looping Concept
//for loop concept
Syntax –
for(initialization ; condition; increment / decrement)
{
//code which you want to perform
}
Example : to print number from 1 to 10
for(int i=1;i<=10;i++)
{
Serial.println(i);
Serial.println(“INDIA”);
}
long int Count=0;
void setup( )
{
pinMode(12, OUTPUT); //Initialize the digital pin as output
Serial.begin(9600);
Serial.println(“count of iterations running are: “);
}
void loop( )
{
for (int i=1;i<=10;i++)
{
Serial.println(i);
digitalWrite(12, HIGH);
Serial.println(“ON”);
delay(1000); // wait for a second
digitalWrite(12, LOW);
 Serial.println(“OFF”);
delay(1000); // wait for a second
}
Count++;
 Serial.print(“Iteration:”);
Serial.println(Count);
}
Condition Statements
if(Condition 1)
{
//Statements
}
if(Condition 2)
{
//Statements
}
else
{
//Statements
}
Topic Learning Outcomes
At the end of the topic the student should be able to
1. Explain the importance of platform based development
2. Use looping, delay and conditioning concepts in
developing a program on Arduino environment.

More Related Content

PPTX
Introduction to Arduino Microcontroller
PPTX
PDF
Ardublock tutorial
PPTX
Introduction to Arduino
PPTX
Arduino Day 1 Presentation
PDF
Introduction to Arduino
PDF
How to measure frequency and duty cycle using arduino
PDF
Arduino electronics cookbook
Introduction to Arduino Microcontroller
Ardublock tutorial
Introduction to Arduino
Arduino Day 1 Presentation
Introduction to Arduino
How to measure frequency and duty cycle using arduino
Arduino electronics cookbook

What's hot (20)

PDF
Arduino spooky projects_class1
PDF
Cassiopeia Ltd - standard Arduino workshop
PPTX
Arduino uno
KEY
Intro to Arduino
PPSX
Arduino اردوينو
PDF
Lab2ppt
PPT
ARDUINO AND ITS PIN CONFIGURATION
PPTX
Arduino Nodebots (Hackster CascadiaJS Workshop)
PDF
Presentation S4A
PPTX
Arduino Workshop Day 2
PPTX
Basics of arduino uno
PPTX
Introduction to the Arduino
PPTX
Getting started with arduino workshop
PPTX
PPTX
PPSX
Embedded systems الانظمة المدمجة
PDF
Introduction to Arduino
PPTX
Arduino
PDF
From Arduino to LinnStrument
PDF
Apostila arduino
Arduino spooky projects_class1
Cassiopeia Ltd - standard Arduino workshop
Arduino uno
Intro to Arduino
Arduino اردوينو
Lab2ppt
ARDUINO AND ITS PIN CONFIGURATION
Arduino Nodebots (Hackster CascadiaJS Workshop)
Presentation S4A
Arduino Workshop Day 2
Basics of arduino uno
Introduction to the Arduino
Getting started with arduino workshop
Embedded systems الانظمة المدمجة
Introduction to Arduino
Arduino
From Arduino to LinnStrument
Apostila arduino
Ad

Similar to Introduction to Arduino (20)

PDF
Arduino programming part1
PPTX
Introduction To Arduino-converted for s.pptx
PDF
The IoT Academy IoT Training Arduino Part 3 programming
PDF
Arduino lab 1_0
PPT
01 Intro to the Arduino and it's basics.ppt
PDF
Syed IoT - module 5
PDF
Lab 2_ Programming an Arduino.pdf
PDF
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
PPTX
arduinoedit.pptx
PPT
Arduino_CSE ece ppt for working and principal of arduino.ppt
PPT
Fundamentals of programming Arduino-Wk2.ppt
PPTX
Arduino intro.pptx
PPTX
Arduino . .
PPT
Arduino is an open-source electronics platform that has an easy-to-use physic...
PPT
Arduino wk2
PDF
Arduino reference
PDF
publish manual
PPTX
Arduino Slides With Neopixels
PPTX
Arduino programming
Arduino programming part1
Introduction To Arduino-converted for s.pptx
The IoT Academy IoT Training Arduino Part 3 programming
Arduino lab 1_0
01 Intro to the Arduino and it's basics.ppt
Syed IoT - module 5
Lab 2_ Programming an Arduino.pdf
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
arduinoedit.pptx
Arduino_CSE ece ppt for working and principal of arduino.ppt
Fundamentals of programming Arduino-Wk2.ppt
Arduino intro.pptx
Arduino . .
Arduino is an open-source electronics platform that has an easy-to-use physic...
Arduino wk2
Arduino reference
publish manual
Arduino Slides With Neopixels
Arduino programming
Ad

More from Amarjeetsingh Thakur (20)

PPTX
“Introduction to MATLAB & SIMULINK”
PDF
Python code for servo control using Raspberry Pi
PDF
Python code for Push button using Raspberry Pi
PDF
Python code for Buzzer Control using Raspberry Pi
PDF
Arduino programming part 2
PDF
Python openCV codes
PDF
Python Numpy Source Codes
PDF
Steemit html blog
PDF
Python OpenCV Real Time projects
PPTX
Adafruit_IoT_Platform
PDF
Core python programming tutorial
PDF
Python openpyxl
PPTX
Introduction to Internet of Things (IoT)
PPTX
Introduction to Node MCU
PPTX
Introduction to Things board (An Open Source IoT Cloud Platform)
PPTX
Introduction to MQ Telemetry Transport (MQTT)
PPTX
Arduino Interfacing with different sensors and motor
PPTX
Image processing in MATLAB
PPTX
Introduction to Arduino
PPTX
Image Processing Using MATLAB
“Introduction to MATLAB & SIMULINK”
Python code for servo control using Raspberry Pi
Python code for Push button using Raspberry Pi
Python code for Buzzer Control using Raspberry Pi
Arduino programming part 2
Python openCV codes
Python Numpy Source Codes
Steemit html blog
Python OpenCV Real Time projects
Adafruit_IoT_Platform
Core python programming tutorial
Python openpyxl
Introduction to Internet of Things (IoT)
Introduction to Node MCU
Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to MQ Telemetry Transport (MQTT)
Arduino Interfacing with different sensors and motor
Image processing in MATLAB
Introduction to Arduino
Image Processing Using MATLAB

Recently uploaded (20)

PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PPTX
master seminar digital applications in india
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
Complications of Minimal Access Surgery at WLH
PDF
Trump Administration's workforce development strategy
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Pharma ospi slides which help in ospi learning
O5-L3 Freight Transport Ops (International) V1.pdf
Chinmaya Tiranga quiz Grand Finale.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Final Presentation General Medicine 03-08-2024.pptx
Orientation - ARALprogram of Deped to the Parents.pptx
master seminar digital applications in india
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Complications of Minimal Access Surgery at WLH
Trump Administration's workforce development strategy
202450812 BayCHI UCSC-SV 20250812 v17.pptx
O7-L3 Supply Chain Operations - ICLT Program
Final Presentation General Medicine 03-08-2024.pptx
Supply Chain Operations Speaking Notes -ICLT Program
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Microbial disease of the cardiovascular and lymphatic systems
Chapter 2 Heredity, Prenatal Development, and Birth.pdf

Introduction to Arduino

  • 2. What is Arduino?  Arduino is an open- source computer hardware and software company, project and user community that designs and manufactures microcontroller-based kits for building systems consisting of digital devices, interactive objects that can sense and control in the physical world.
  • 3. How to program Arduino?  The Arduino Integrated Development Environment (IDE) supports the C and C++ programming languages using special rules of code organization.  The Arduino IDE supplies a software library called "Wiring" from the Wiring project, which provides many common input and output procedures.
  • 9. Technical specifications:  Microcontroller: Microchip ATmega328P  Operating Voltage: 5 Volt  Input Voltage: 7 to 20 Volts  Digital I/O Pins: 14 (of which 6 provide PWM output)  Analog Input Pins: 6  DC Current per I/O Pin: 20 mA  DC Current for 3.3V Pin: 50 mA  Flash Memory: 32 KB of which 0.5 KB used by bootloader  SRAM: 2 KB  EEPROM: 1 KB  Clock Speed: 16 MHz  Length: 68.6 mm  Width: 53.4 mm  Weight: 25 g
  • 10. Program Structure Setup( ) { // A function that runs once at the start of a program and is used to set //pinMode or initialize serial communication } loop( ) { // This function includes the code to be executed continuously – reading inputs, //triggering outputs, etc. // This function is the core of all Arduino programs and does the bulk of the //work. }
  • 11. Activity 1.1 Type : Team of 2 Duration : 15 Minutes Use LED blink program from example and upload it on the ARDUINO board
  • 12. Functions to handle digital I/O pinMode (pin, OUTPUT); // make the digital pin either INPUT or OUTPUT  digitalRead (pin); //used to get the content on the pin which is HIGH(1) or LOW(0)  digitalWrite(pin, value) //used to send HIGH(1) or LOW(0) value to a pin
  • 13. Time Function  delay(ms) // waits for milli – seconds
  • 14. /*….. Program to blink the LED on pin 13 …..*/ void setup( ) { pinMode(13, OUTPUT); //Initialize the digital pin as output } void loop( ) { digitalWrite(13, HIGH); // Turn the LED ON delay(1000); // Wait for one second digitalWrite(13, LOW); // Turn the LED OFF delay(1000); // Wait for one second }
  • 15. Activity 1.2 Type : Team of 2 Duration : 10 Minutes Modify the program to blink LED every 2 sec on pin 12.
  • 16. Circuit for the LED Cathode of LED Anode of LED
  • 17. /*….. Program to blink the LED every 2 second on pin12*/ void setup( ) { pinMode(12, OUTPUT); //Initialize the digital pin as output } void loop( ) { digitalWrite(12, HIGH); // Turn the LED ON delay(2000); // Wait for a two second digitalWrite(12, LOW); // Turn the LED OFF delay(2000); // Wait for a two second }
  • 18. Activity 1.3 Type : Team of 2 Duration : 15 Minutes Modify the program to display the LED state every 2 sec on Serial Monitor.
  • 19. Serial communication with ArduinoWhat is serial communication ?
  • 20. The word serial means "one after the other."  What is Baud rate ? Number of symbols transferred per sec
  • 21. Serial Display Functions  Serial.begin(baud_rate) //baud rate(characters per sec) between computer and board is typically 9600 although you can work with other speeds by changing settings of COM Port  Serial.print(value), //value could be any data and even string  Serial.println(value) //print in new line
  • 22. Eg. Print INDIA on serial monitor void setup( ) { Serial.begin(9600);// 9600 is default baud rate of serial com port of a computer } void loop( ) { Serial.println(“INDIA”); // Send the value “INDIA” }
  • 24. /*….. Modify the program to blink on pin12 and display the LED state every 2 sec on Serial Monitor…..*/ void setup( ) { pinMode(12, OUTPUT); //Initialize the digital pin as output Serial.begin(9600); } void loop( ) { digitalWrite(12, HIGH); // Turn the LED ON Serial.println(“ON”); // Send the value “ON” delay(2000); // Wait for a second digitalWrite(12, LOW); // Turn the LED OFF Serial.println(“OFF”); // Send the value “OFF” delay(2000); // Wait for a second }
  • 25. Activity 1.4 Type : Team of 2 Duration : 25 Minutes Modify the program to blink 10 times per loop iteration and display no. of loop iterations on serial monitor.
  • 26. Looping Concept //for loop concept Syntax – for(initialization ; condition; increment / decrement) { //code which you want to perform } Example : to print number from 1 to 10 for(int i=1;i<=10;i++) { Serial.println(i); Serial.println(“INDIA”); }
  • 27. long int Count=0; void setup( ) { pinMode(12, OUTPUT); //Initialize the digital pin as output Serial.begin(9600); Serial.println(“count of iterations running are: “); } void loop( ) { for (int i=1;i<=10;i++) { Serial.println(i); digitalWrite(12, HIGH); Serial.println(“ON”); delay(1000); // wait for a second digitalWrite(12, LOW);  Serial.println(“OFF”); delay(1000); // wait for a second } Count++;  Serial.print(“Iteration:”); Serial.println(Count); }
  • 28. Condition Statements if(Condition 1) { //Statements } if(Condition 2) { //Statements } else { //Statements }
  • 29. Topic Learning Outcomes At the end of the topic the student should be able to 1. Explain the importance of platform based development 2. Use looping, delay and conditioning concepts in developing a program on Arduino environment.