SlideShare a Scribd company logo
Introduction to Arduino
.
What is Arduino?
• The Arduino is an open source hardware and software platform that is
incredibly powerful yet easy to use.
• You can look at and download the code from any of the Arduino repositories on
GitHub here:
• https://github.com/arduino
• This platform has captured the imagination of electronic enthusiasts and the
maker community everywhere. It enables people to inexpensively experiment
with electronic prototypes and see their projects come to life.
• Projects can range from simply making an LED blink or recording the
temperature to controlling 3D printers or making robots.
• While there are numerous models of the Arduino, in this course we will
primarily be using the very popular Arduino UNO R3 board.
TYPES OF
ARDUINO
Arduino Uno's R3 board layout
DC supply Input: The DC supply input can
be used with an AC-to-DC power
adapter or a battery. The power source can
be connected using a 2.1 mm centerpositive
plug. The Arduino Uno operates at 5 volts
but can have a maximum input of 20 volts;
however, it is recommended to not use
more than 12V.
Voltage Regulator: The Arduino uses a
linear regulator to control the voltage
going into the board.
USB Port: The USB port can be used to
power and program the board.
RESET button: This button, when pressed,
will reset the board.
ICSP for USB: The in-circuit serial
programming pins are used to
flash the firmware on the USB
interface chip.
ICSP for ATmega328: The
in-circuit serial programming pins
are used to flash the firmware on
the ATmega microcontroller.
ATmega328: The microcontroller
for the Arduino Uno board.
Digital and PWM connectors: These pins,
labeled 0 to 13, can be used as either a digital
input or output pins. The pins labeled with the
tilde (~) can also be used for Pulse-Width
Modulation (PWM) output.
Analog In Connectors: The pins, labeled A0 to
A5, can be used for analog input. These pins
can be used to read the output from analog
sensors.
Power and External Reset: These pins in this
header, provide ground and power for external
devices and sensors from the Arduino. The
Arduino can also be powered through these
pins. There is also a reset pin that can be used
to reset the Arduino.
Arduino shields
• An Arduino shield is a modular circuit board
that plugs directly into the pin headers of
the Arduino board.
• These shields will add extra functionality to
the Arduino board.
• If we are looking to connect to the internet,
do speech recognition, control DC motors
or add other functionality to the Arduino,
there is probably a shield that can help us.
• While you don’t have to use shields, they
do make adding extra functionality to our
Arduino boards very easy.
Arduino looks with two shields attached:
•A shield fits on top of
the Arduino by
plugging directly into
the pin headers.
•We can also stack one
shield on top of
another if they do not
use the same
resources. Here is how
an
Arduino pin
• There is a total
of 31 pins in the
Arduino Uno pin
headers.
• Most of these
pins can be
configured to
perform
different
functions.
Digital pins
•Used the most when
connecting external
sensors.
•These pins can be
configured for either
input or output.
•These pins default to
an input state
•The digital pins will
have one of two
values: HIGH (1),
which is 5V, or LOW
(0), which is 0V.
Analog input pins
• The Arduino Uno contains a
built-in Analog-To-Digital (ADC)
converter with six channels, which
gives us six analog input pins. The
ADC converts an analog signal into
a digital value.
• While the digital pins have two
values, either high or low, the
analog input pins have values from
0 to 1023 relative to the reference
value of the Arduino.
• The Arduino Uno has a reference
value of 5V.
• Used to read analog sensors such
as rangefinders and temperature
sensors.
• The six analog pins can also be
configured as digital pins if we run
out of digital pins in our project.
PWM pins
• Where the analog input
pins are designed to read
analog sensors (input),
the PWM pins are
designed for output.
PWM is a technique for
obtaining analog results
with digital output.
• Since a digital output can
be either on or off, to
obtain the analog output
the digital output is
switch between HIGH
and LOW rapidly.
• The percentage of the
time that the signal is
high is called the duty
cycle.
Duty cycle
• We have the ability to set the
frequency of how fast the signal
can switch between HIGH and
LOW.
• This frequency is measured in
Hertz and sets how many times
the signal can switch per
second.
• For example, if we set the
frequency to 500 Hz, that
would mean that the signal
could switch 500 times a
second.
• This will be come clearer as we
use the pins.
Power pins
• VIN: This pin is used when we
power the Arduino board using an
external power supply.
• GND: These are the ground pins.
• 5V: This is 5V out and is used to
power most sensors.
• 3.3V: This is 3.3V out and can be
used to power sensors that are
compatible with 3.3V.
• Reset: This pin can be used to reset
the Arduino board by an external
source.
• ioref: This is the reference voltage
for the board. For the Arduino, this
will be 5V.
Serial pins
• Used for serial communication.
• The RX (digital pin 0) is used to
receive.
• TX (digital pin 1) is used to
transmit.
• Serial communications work on
binary (1’s and 0’s).
• Provided for legacy reasons
primarily.
SPI pins
• The Serial Peripheral Interface
(SPI) pins are used for a
synchronous serial data protocol
that is used by microcontrollers for
communicating with peripheral
devices.
• This protocol always has one
master with one or more slave
devices.
• MISO: The Master in Slave out pin
is used to send data from the slave
to the master device.
• MOSI: The Master out Slave in the
pin is used to send data from the
master to the slave device.
• SCK: The serial clock synchronizes
the data transmission and is
generated by the master.
• SS: The slave select pin tells the
slave to go active or to go to sleep.
This is used to select which slave
device should receive the
transmission from the master.
Installing the IDE
• The first step in programming an Arduino board install the
Arduino IDE (integrated development environment).
• Linux/Raspberry PI
• This program checks code and loads it onto the Arduino. Install
the latest version of Arduino IDE using apt:
• sudo apt-get update && sudo apt-get upgrade
• sudo apt-get install Arduino
• Windows
• Download from: https://www.arduino.cc/en/Main/Software
Programming in for Arduino
• The Arduino programming language
is based on a very simple hardware
programming language called
processing, which is similar to the C
language.
• You create sketches which contain
your code
• After the sketch is written in the
Arduino IDE, it should be uploaded
on the Arduino board for execution.
void setup( )
{
statements;
}
void loop( )
{
statement;
}
The setup function is the first to
execute when the program is
executed, and this function is called
only once.
Used to initialize the pin modes and
start serial communication. This
function has to be included even if
there are no statements to execute.
The execution block runs after setup
and hosts statements like reading
inputs, triggering outputs, checking
conditions etc..
As the name suggests, the loop( )
function executes the set of
statements (enclosed in curly braces)
repeatedly.
Basic code
structure
Example
program
int led = 9; // The digital pin to which the LED is connected
int brightness = 0; // Brightness of LED is initially set to 0
int fade = 5; // By how many points the LED should fade
void setup()
{
pinMode(led, OUTPUT); //pin 10 is set as output pin
}
void loop() // The loop function runs again and again
{
analogWrite(led, brightness); // set the brightness of LED
brightness = brightness + fade; //Increase the brightness of LED by 5 points
if (brightness <= 0 || brightness >= 255) // check the level of brightness
{
fade = -fade;
}
delay(30); // Wait for 30 milliseconds
}
LED fade-in and
fade-out
Ad

More Related Content

Similar to Arduino microcontroller ins and outs with pin diagram (20)

The document proceeds to explain the main components of an Arduino Uno board ...
The document proceeds to explain the main components of an Arduino Uno board ...The document proceeds to explain the main components of an Arduino Uno board ...
The document proceeds to explain the main components of an Arduino Uno board ...
QucngV
 
Introduction to arduino!
Introduction to arduino!Introduction to arduino!
Introduction to arduino!
Makers of India
 
Internet of Things Unit 3 notes-Design and Development and Arduino.pptx
Internet of Things Unit 3 notes-Design and Development and Arduino.pptxInternet of Things Unit 3 notes-Design and Development and Arduino.pptx
Internet of Things Unit 3 notes-Design and Development and Arduino.pptx
Dinola2
 
teststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptxteststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptx
ethannguyen1618
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdf
ssusere5db05
 
Arduino course
Arduino courseArduino course
Arduino course
Ahmed Shelbaya
 
Embedded system application
Embedded system applicationEmbedded system application
Embedded system application
Dhruwank Vankawala
 
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauriArduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Gaurav Pandey
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the Arduino
Wingston
 
aurduino-200107075953.pdf
aurduino-200107075953.pdfaurduino-200107075953.pdf
aurduino-200107075953.pdf
HebaEng
 
Arduino: On-board components description, IDE and Programming
Arduino: On-board components description, IDE and Programming Arduino: On-board components description, IDE and Programming
Arduino: On-board components description, IDE and Programming
Pawan Dubey, PhD
 
Arduino Slides With Neopixels
Arduino Slides With NeopixelsArduino Slides With Neopixels
Arduino Slides With Neopixels
sdcharle
 
Internet of Things prescribed by University
Internet of Things prescribed by UniversityInternet of Things prescribed by University
Internet of Things prescribed by University
Sanjay Kumar
 
Arduino Family
Arduino FamilyArduino Family
Arduino Family
mahalakshmimalini
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
baabtra.com - No. 1 supplier of quality freshers
 
Neno Project.docx
Neno Project.docxNeno Project.docx
Neno Project.docx
AditiBhushan3
 
Introduction to arduino ppt main
Introduction to  arduino ppt mainIntroduction to  arduino ppt main
Introduction to arduino ppt main
eddy royappa
 
Basics of open source embedded development board (
Basics of open source embedded development board (Basics of open source embedded development board (
Basics of open source embedded development board (
Dhruwank Vankawala
 
Basics of open source embedded development board (
Basics of open source embedded development board (Basics of open source embedded development board (
Basics of open source embedded development board (
Dhruwank Vankawala
 
Introduction to Arduino session and basically it depends how you us and where...
Introduction to Arduino session and basically it depends how you us and where...Introduction to Arduino session and basically it depends how you us and where...
Introduction to Arduino session and basically it depends how you us and where...
YakshYadav2
 
The document proceeds to explain the main components of an Arduino Uno board ...
The document proceeds to explain the main components of an Arduino Uno board ...The document proceeds to explain the main components of an Arduino Uno board ...
The document proceeds to explain the main components of an Arduino Uno board ...
QucngV
 
Introduction to arduino!
Introduction to arduino!Introduction to arduino!
Introduction to arduino!
Makers of India
 
Internet of Things Unit 3 notes-Design and Development and Arduino.pptx
Internet of Things Unit 3 notes-Design and Development and Arduino.pptxInternet of Things Unit 3 notes-Design and Development and Arduino.pptx
Internet of Things Unit 3 notes-Design and Development and Arduino.pptx
Dinola2
 
teststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptxteststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptx
ethannguyen1618
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdf
ssusere5db05
 
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauriArduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Gaurav Pandey
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the Arduino
Wingston
 
aurduino-200107075953.pdf
aurduino-200107075953.pdfaurduino-200107075953.pdf
aurduino-200107075953.pdf
HebaEng
 
Arduino: On-board components description, IDE and Programming
Arduino: On-board components description, IDE and Programming Arduino: On-board components description, IDE and Programming
Arduino: On-board components description, IDE and Programming
Pawan Dubey, PhD
 
Arduino Slides With Neopixels
Arduino Slides With NeopixelsArduino Slides With Neopixels
Arduino Slides With Neopixels
sdcharle
 
Internet of Things prescribed by University
Internet of Things prescribed by UniversityInternet of Things prescribed by University
Internet of Things prescribed by University
Sanjay Kumar
 
Introduction to arduino ppt main
Introduction to  arduino ppt mainIntroduction to  arduino ppt main
Introduction to arduino ppt main
eddy royappa
 
Basics of open source embedded development board (
Basics of open source embedded development board (Basics of open source embedded development board (
Basics of open source embedded development board (
Dhruwank Vankawala
 
Basics of open source embedded development board (
Basics of open source embedded development board (Basics of open source embedded development board (
Basics of open source embedded development board (
Dhruwank Vankawala
 
Introduction to Arduino session and basically it depends how you us and where...
Introduction to Arduino session and basically it depends how you us and where...Introduction to Arduino session and basically it depends how you us and where...
Introduction to Arduino session and basically it depends how you us and where...
YakshYadav2
 

More from ArifatunNesa (8)

CH13-COA10e update Addressing mode of instruction.pptx
CH13-COA10e update Addressing mode of instruction.pptxCH13-COA10e update Addressing mode of instruction.pptx
CH13-COA10e update Addressing mode of instruction.pptx
ArifatunNesa
 
Computer Security- Lecture-11 Security Attacks.pptx
Computer Security- Lecture-11 Security Attacks.pptxComputer Security- Lecture-11 Security Attacks.pptx
Computer Security- Lecture-11 Security Attacks.pptx
ArifatunNesa
 
Cache Memory from Computer Architecture.ppt
Cache Memory from Computer Architecture.pptCache Memory from Computer Architecture.ppt
Cache Memory from Computer Architecture.ppt
ArifatunNesa
 
cryptography-and-network-security-behrouz-ch01-slides.pptx
cryptography-and-network-security-behrouz-ch01-slides.pptxcryptography-and-network-security-behrouz-ch01-slides.pptx
cryptography-and-network-security-behrouz-ch01-slides.pptx
ArifatunNesa
 
Computer Security- Lecture-03 Overview of Cryptography.pptx
Computer Security- Lecture-03 Overview of Cryptography.pptxComputer Security- Lecture-03 Overview of Cryptography.pptx
Computer Security- Lecture-03 Overview of Cryptography.pptx
ArifatunNesa
 
1618962066755_Lesson_02_Sura_Asor and objective pronouns_40 slides (1).pptx
1618962066755_Lesson_02_Sura_Asor and objective pronouns_40 slides (1).pptx1618962066755_Lesson_02_Sura_Asor and objective pronouns_40 slides (1).pptx
1618962066755_Lesson_02_Sura_Asor and objective pronouns_40 slides (1).pptx
ArifatunNesa
 
Lecture 4_Linear & Binary search from data structure and algorithm
Lecture 4_Linear & Binary search from data structure and algorithmLecture 4_Linear & Binary search from data structure and algorithm
Lecture 4_Linear & Binary search from data structure and algorithm
ArifatunNesa
 
Lecture-05(Mouse Tecnology).pptx.pdf on Computer peripheral
Lecture-05(Mouse Tecnology).pptx.pdf on Computer peripheralLecture-05(Mouse Tecnology).pptx.pdf on Computer peripheral
Lecture-05(Mouse Tecnology).pptx.pdf on Computer peripheral
ArifatunNesa
 
CH13-COA10e update Addressing mode of instruction.pptx
CH13-COA10e update Addressing mode of instruction.pptxCH13-COA10e update Addressing mode of instruction.pptx
CH13-COA10e update Addressing mode of instruction.pptx
ArifatunNesa
 
Computer Security- Lecture-11 Security Attacks.pptx
Computer Security- Lecture-11 Security Attacks.pptxComputer Security- Lecture-11 Security Attacks.pptx
Computer Security- Lecture-11 Security Attacks.pptx
ArifatunNesa
 
Cache Memory from Computer Architecture.ppt
Cache Memory from Computer Architecture.pptCache Memory from Computer Architecture.ppt
Cache Memory from Computer Architecture.ppt
ArifatunNesa
 
cryptography-and-network-security-behrouz-ch01-slides.pptx
cryptography-and-network-security-behrouz-ch01-slides.pptxcryptography-and-network-security-behrouz-ch01-slides.pptx
cryptography-and-network-security-behrouz-ch01-slides.pptx
ArifatunNesa
 
Computer Security- Lecture-03 Overview of Cryptography.pptx
Computer Security- Lecture-03 Overview of Cryptography.pptxComputer Security- Lecture-03 Overview of Cryptography.pptx
Computer Security- Lecture-03 Overview of Cryptography.pptx
ArifatunNesa
 
1618962066755_Lesson_02_Sura_Asor and objective pronouns_40 slides (1).pptx
1618962066755_Lesson_02_Sura_Asor and objective pronouns_40 slides (1).pptx1618962066755_Lesson_02_Sura_Asor and objective pronouns_40 slides (1).pptx
1618962066755_Lesson_02_Sura_Asor and objective pronouns_40 slides (1).pptx
ArifatunNesa
 
Lecture 4_Linear & Binary search from data structure and algorithm
Lecture 4_Linear & Binary search from data structure and algorithmLecture 4_Linear & Binary search from data structure and algorithm
Lecture 4_Linear & Binary search from data structure and algorithm
ArifatunNesa
 
Lecture-05(Mouse Tecnology).pptx.pdf on Computer peripheral
Lecture-05(Mouse Tecnology).pptx.pdf on Computer peripheralLecture-05(Mouse Tecnology).pptx.pdf on Computer peripheral
Lecture-05(Mouse Tecnology).pptx.pdf on Computer peripheral
ArifatunNesa
 
Ad

Recently uploaded (20)

IntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdfIntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdf
Luiz Carneiro
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
Data Structures_Linear data structures Linked Lists.pptx
Data Structures_Linear data structures Linked Lists.pptxData Structures_Linear data structures Linked Lists.pptx
Data Structures_Linear data structures Linked Lists.pptx
RushaliDeshmukh2
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
Resistance measurement and cfd test on darpa subboff model
Resistance measurement and cfd test on darpa subboff modelResistance measurement and cfd test on darpa subboff model
Resistance measurement and cfd test on darpa subboff model
INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
The Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLabThe Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLab
Journal of Soft Computing in Civil Engineering
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
IntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdfIntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdf
Luiz Carneiro
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
Data Structures_Linear data structures Linked Lists.pptx
Data Structures_Linear data structures Linked Lists.pptxData Structures_Linear data structures Linked Lists.pptx
Data Structures_Linear data structures Linked Lists.pptx
RushaliDeshmukh2
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Ad

Arduino microcontroller ins and outs with pin diagram

  • 2. What is Arduino? • The Arduino is an open source hardware and software platform that is incredibly powerful yet easy to use. • You can look at and download the code from any of the Arduino repositories on GitHub here: • https://github.com/arduino • This platform has captured the imagination of electronic enthusiasts and the maker community everywhere. It enables people to inexpensively experiment with electronic prototypes and see their projects come to life. • Projects can range from simply making an LED blink or recording the temperature to controlling 3D printers or making robots. • While there are numerous models of the Arduino, in this course we will primarily be using the very popular Arduino UNO R3 board.
  • 4. Arduino Uno's R3 board layout DC supply Input: The DC supply input can be used with an AC-to-DC power adapter or a battery. The power source can be connected using a 2.1 mm centerpositive plug. The Arduino Uno operates at 5 volts but can have a maximum input of 20 volts; however, it is recommended to not use more than 12V. Voltage Regulator: The Arduino uses a linear regulator to control the voltage going into the board. USB Port: The USB port can be used to power and program the board. RESET button: This button, when pressed, will reset the board.
  • 5. ICSP for USB: The in-circuit serial programming pins are used to flash the firmware on the USB interface chip. ICSP for ATmega328: The in-circuit serial programming pins are used to flash the firmware on the ATmega microcontroller. ATmega328: The microcontroller for the Arduino Uno board.
  • 6. Digital and PWM connectors: These pins, labeled 0 to 13, can be used as either a digital input or output pins. The pins labeled with the tilde (~) can also be used for Pulse-Width Modulation (PWM) output. Analog In Connectors: The pins, labeled A0 to A5, can be used for analog input. These pins can be used to read the output from analog sensors. Power and External Reset: These pins in this header, provide ground and power for external devices and sensors from the Arduino. The Arduino can also be powered through these pins. There is also a reset pin that can be used to reset the Arduino.
  • 7. Arduino shields • An Arduino shield is a modular circuit board that plugs directly into the pin headers of the Arduino board. • These shields will add extra functionality to the Arduino board. • If we are looking to connect to the internet, do speech recognition, control DC motors or add other functionality to the Arduino, there is probably a shield that can help us. • While you don’t have to use shields, they do make adding extra functionality to our Arduino boards very easy.
  • 8. Arduino looks with two shields attached: •A shield fits on top of the Arduino by plugging directly into the pin headers. •We can also stack one shield on top of another if they do not use the same resources. Here is how an
  • 9. Arduino pin • There is a total of 31 pins in the Arduino Uno pin headers. • Most of these pins can be configured to perform different functions.
  • 10. Digital pins •Used the most when connecting external sensors. •These pins can be configured for either input or output. •These pins default to an input state •The digital pins will have one of two values: HIGH (1), which is 5V, or LOW (0), which is 0V.
  • 11. Analog input pins • The Arduino Uno contains a built-in Analog-To-Digital (ADC) converter with six channels, which gives us six analog input pins. The ADC converts an analog signal into a digital value. • While the digital pins have two values, either high or low, the analog input pins have values from 0 to 1023 relative to the reference value of the Arduino. • The Arduino Uno has a reference value of 5V. • Used to read analog sensors such as rangefinders and temperature sensors. • The six analog pins can also be configured as digital pins if we run out of digital pins in our project.
  • 12. PWM pins • Where the analog input pins are designed to read analog sensors (input), the PWM pins are designed for output. PWM is a technique for obtaining analog results with digital output. • Since a digital output can be either on or off, to obtain the analog output the digital output is switch between HIGH and LOW rapidly. • The percentage of the time that the signal is high is called the duty cycle.
  • 13. Duty cycle • We have the ability to set the frequency of how fast the signal can switch between HIGH and LOW. • This frequency is measured in Hertz and sets how many times the signal can switch per second. • For example, if we set the frequency to 500 Hz, that would mean that the signal could switch 500 times a second. • This will be come clearer as we use the pins.
  • 14. Power pins • VIN: This pin is used when we power the Arduino board using an external power supply. • GND: These are the ground pins. • 5V: This is 5V out and is used to power most sensors. • 3.3V: This is 3.3V out and can be used to power sensors that are compatible with 3.3V. • Reset: This pin can be used to reset the Arduino board by an external source. • ioref: This is the reference voltage for the board. For the Arduino, this will be 5V.
  • 15. Serial pins • Used for serial communication. • The RX (digital pin 0) is used to receive. • TX (digital pin 1) is used to transmit. • Serial communications work on binary (1’s and 0’s). • Provided for legacy reasons primarily.
  • 16. SPI pins • The Serial Peripheral Interface (SPI) pins are used for a synchronous serial data protocol that is used by microcontrollers for communicating with peripheral devices. • This protocol always has one master with one or more slave devices. • MISO: The Master in Slave out pin is used to send data from the slave to the master device. • MOSI: The Master out Slave in the pin is used to send data from the master to the slave device. • SCK: The serial clock synchronizes the data transmission and is generated by the master. • SS: The slave select pin tells the slave to go active or to go to sleep. This is used to select which slave device should receive the transmission from the master.
  • 17. Installing the IDE • The first step in programming an Arduino board install the Arduino IDE (integrated development environment). • Linux/Raspberry PI • This program checks code and loads it onto the Arduino. Install the latest version of Arduino IDE using apt: • sudo apt-get update && sudo apt-get upgrade • sudo apt-get install Arduino • Windows • Download from: https://www.arduino.cc/en/Main/Software
  • 18. Programming in for Arduino • The Arduino programming language is based on a very simple hardware programming language called processing, which is similar to the C language. • You create sketches which contain your code • After the sketch is written in the Arduino IDE, it should be uploaded on the Arduino board for execution. void setup( ) { statements; } void loop( ) { statement; } The setup function is the first to execute when the program is executed, and this function is called only once. Used to initialize the pin modes and start serial communication. This function has to be included even if there are no statements to execute. The execution block runs after setup and hosts statements like reading inputs, triggering outputs, checking conditions etc.. As the name suggests, the loop( ) function executes the set of statements (enclosed in curly braces) repeatedly. Basic code structure
  • 19. Example program int led = 9; // The digital pin to which the LED is connected int brightness = 0; // Brightness of LED is initially set to 0 int fade = 5; // By how many points the LED should fade void setup() { pinMode(led, OUTPUT); //pin 10 is set as output pin } void loop() // The loop function runs again and again { analogWrite(led, brightness); // set the brightness of LED brightness = brightness + fade; //Increase the brightness of LED by 5 points if (brightness <= 0 || brightness >= 255) // check the level of brightness { fade = -fade; } delay(30); // Wait for 30 milliseconds } LED fade-in and fade-out