SlideShare a Scribd company logo
INTRODUCTION TO ARDUINO
PROGRAMMING & INTERFACING
Topics:
Microcontrollers
Programming Basics: structure and
variables
Digital Output
Analog to Digital Conversion
What is a Microcontroller
• A small computer on a single chip
• containing a processor, memory, and input/output
• Typically "embedded" inside some device that they control
• A microcontroller is often small and low cost
What is a Development Board
• A printed circuit
board designed to
facilitate work with a
particular
microcontroller.
• Typical components include:
• power circuit
• programming interface
• basic input; usually buttons and LEDs
• I/O pins
The Arduino Development Board
The Arduino Microcontroller: Atmel
ARV Atmega 328
What is the Arduino
Getting Started
• Check out: http://arduino.cc/en/Guide/HomePage
1. Download & install the Arduino environment (IDE)
2. Connect the board to your computer via the UBS cable
3. If needed, install the drivers (not needed in lab)
4. Launch the Arduino IDE
5. Select your board
6. Select your serial port
7. Open the blink example
8. Upload the program
Try It: Connect the USB Cable
Arduino IDE
See: http://arduino.cc/en/Guide/Environment for more information
Select Serial Port and Board
Status Messages
Arduino-programming tutorial for newbies.ppt
Add an External LED to pin 13
• File > Examples > Digital > Blink
• LED’s have polarity
– Negative indicated by flat side of the housing
and a short leg
A Little Bit About Programming
• Code is case
sensitive
• Statements are
commands and
must end with a
semi-colon
• Comments follow
a // or begin with /*
and end with */
• Loop and Setup
Our First Program
Terminology
Digital I/0
pinMode(pin, mode)
Sets pin to either INPUT or OUTPUT
digitalRead(pin)
Reads HIGH or LOW from a pin
digitalWrite(pin, value)
Writes HIGH or LOW to a pin
Electronic stuff
Output pins can provide 40 mA of current
Writing HIGH to an input pin installs a 20KΩ pullup
www.mikroe.com/chapters/view/1
Arduino Timing
• delay(ms)
– Pauses for a few milliseconds
• delayMicroseconds(us)
– Pauses for a few microseconds
• More commands:
arduino.cc/en/Reference/HomePage
Digital? Analog?
• Digital has two values: on and off
• Analog has many (infinite) values
• Computers don’t really do analog, they quantize
• Remember the 6 analog input pins---here’s how
they work
Bits and Bytes
Variables
Putting It Together
• Complete the sketch
(program) below.
• What output will be
generated by this program?
• What if the schematic were
changed? 
Good References
www.arduino.cc
www.ladyada.net/learn/arduino
www.EarthshineElectronics.com

More Related Content

PPT
ArduinoPart1ArduinoPart1ArduinoPart1.ppt
PPT
ArduinoPart1.ppt
PPT
ArduinoPart1.ppt
PPT
ArduinoPart1.ppt
PPT
Arduino Uno and micro controller atmega328p
PPT
arduino wit c pp programing gchchchdf.ppt
PPT
Arduino description and interfacing details
PPT
Arduino un curso de corta duración - Parte 1
ArduinoPart1ArduinoPart1ArduinoPart1.ppt
ArduinoPart1.ppt
ArduinoPart1.ppt
ArduinoPart1.ppt
Arduino Uno and micro controller atmega328p
arduino wit c pp programing gchchchdf.ppt
Arduino description and interfacing details
Arduino un curso de corta duración - Parte 1

Similar to Arduino-programming tutorial for newbies.ppt (20)

PPT
arudino introction and types of boards main aruduni uno
PPT
13223971.ppt
PPTX
Introduction to Arduino with ArduBlock & SparkFun LilyPad
PDF
Arduino_IOT Arduino_IOT Arduino_IOTArdui
PPTX
Arduino basics & programming skill development
PPTX
Arduino Introduction PPT for school students
PPTX
Introduction to the Arduino
PDF
introductiontoarduino-111120102058-phpapp02.pdf
PDF
PPTX
Introduction To Arduino-converted for s.pptx
PPT
Arduino_CSE ece ppt for working and principal of arduino.ppt
PPTX
Arduino Programming Familiarization
PPTX
Basic arduino components and more things about arduino
PPTX
Aurdino presentation
PDF
Arduino - Learning.pdf
PPTX
Arduino.pptx
PPT
arduino.ppt
PPS
What is Arduino ?
PDF
NSTA 2013 Denver - ArduBlock and Arduino
arudino introction and types of boards main aruduni uno
13223971.ppt
Introduction to Arduino with ArduBlock & SparkFun LilyPad
Arduino_IOT Arduino_IOT Arduino_IOTArdui
Arduino basics & programming skill development
Arduino Introduction PPT for school students
Introduction to the Arduino
introductiontoarduino-111120102058-phpapp02.pdf
Introduction To Arduino-converted for s.pptx
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino Programming Familiarization
Basic arduino components and more things about arduino
Aurdino presentation
Arduino - Learning.pdf
Arduino.pptx
arduino.ppt
What is Arduino ?
NSTA 2013 Denver - ArduBlock and Arduino
Ad

Recently uploaded (20)

PPTX
The-Looming-Shadow-How-AI-Poses-Dangers-to-Humanity.pptx
PDF
오픈소스 LLM, vLLM으로 Production까지 (Instruct.KR Summer Meetup, 2025)
PDF
Queuing formulas to evaluate throughputs and servers
PDF
algorithms-16-00088-v2hghjjnjnhhhnnjhj.pdf
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PDF
BRKDCN-2613.pdf Cisco AI DC NVIDIA presentation
PPTX
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Top 10 read articles In Managing Information Technology.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
Glazing at Facade, functions, types of glazing
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
PDF
flutter Launcher Icons, Splash Screens & Fonts
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
The-Looming-Shadow-How-AI-Poses-Dangers-to-Humanity.pptx
오픈소스 LLM, vLLM으로 Production까지 (Instruct.KR Summer Meetup, 2025)
Queuing formulas to evaluate throughputs and servers
algorithms-16-00088-v2hghjjnjnhhhnnjhj.pdf
Lesson 3_Tessellation.pptx finite Mathematics
BRKDCN-2613.pdf Cisco AI DC NVIDIA presentation
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
Operating System & Kernel Study Guide-1 - converted.pdf
OOP with Java - Java Introduction (Basics)
CH1 Production IntroductoryConcepts.pptx
bas. eng. economics group 4 presentation 1.pptx
Top 10 read articles In Managing Information Technology.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
Glazing at Facade, functions, types of glazing
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
flutter Launcher Icons, Splash Screens & Fonts
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Ad

Arduino-programming tutorial for newbies.ppt