0% found this document useful (0 votes)
104 views31 pages

The Arduino Platform: Resorce Person

The document discusses the Arduino platform. It describes the main components of the Arduino environment including the development board, Arduino IDE, and shields. The development board uses an 8-bit microcontroller and USB interface. The Arduino IDE is a cross-compiler, debugger and programmer. Shields add unique functionalities. The document also provides examples of blinking an LED and interfacing an LCD with coding examples and schematics.

Uploaded by

Saad Bin Munir
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
104 views31 pages

The Arduino Platform: Resorce Person

The document discusses the Arduino platform. It describes the main components of the Arduino environment including the development board, Arduino IDE, and shields. The development board uses an 8-bit microcontroller and USB interface. The Arduino IDE is a cross-compiler, debugger and programmer. Shields add unique functionalities. The document also provides examples of blinking an LED and interfacing an LCD with coding examples and schematics.

Uploaded by

Saad Bin Munir
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 31

Department of Electrical Engineering C.I.I.

T ATD

The Arduino Platform

Resorce Person: Engr. Usman Khalid


Lecturer EE Dept.
COMSATS ATD

1
Arduino Environment

• Development Board

• Arduino IDE

• Arduino Shields

2
Arduino Environment
A Development Board
 8-bit Microcontroller
 Programming hardware
 USB programming interface
 I-0 pins

3
Arduino IDE
Arduino Integrated
development environment.

 Cross-compiler
 Debugger
 Simulator
 programmer

4
Arduino Shields
• Special-purpose “shields”

 Boards
 unique functionalities
 easy to attach
 good libraries provided

5
6
Development Board

7
8
Microcontrollers
 ATmega328 is microcontroller
programmed by the user
Application code
 User code

 ATmega16U2 handles USB


communication
 Firmware
 USB interface, power mode,
reset etc.

 A .hex file is generated from the


.elf file after linking

9
10
11
12
13
Arduino Sketch
 A program is called a Sketch
 C++ program using Arduino library fuctions
 C++ is a superset of C
 All C programs are legal C++

 C++ also include classes


 Group together data and functions that are
related

14
Sketch Structure
Setup() function
 A sketch does not have a main() function
 Every Sketch has a setup() function
Executed once when Arduino is powered up
 Used for initialization operations
 Returns no value, take no arguments

void setup()
{
……
} 15
Loop() function
 Every Sketch has a loop() function
 Executed iteratively as long as the Arduino is powered up
 loop() starts executing after setup() has finished
 loop() is the main program control flow
 Returns no value, take no arguments

void loop()
{
……
}

16
17
18
19
Buttons for common commands

20
Verify

Upload
21
22
23
Blink LED Sketch

24
Turn ON and OFF LED connected to pin 13,
when button is turned ON and OFF connected
to pin 2 of the Ardunio.

25
26
27
Interfacing LCD to Arduino

28
29
30
Bibliography

• https://www.arduino.cc/
• https://electrosome.com/interfacing-lcd-arduino-uno/
• http://www.ics.uci.edu/~harris/publications.html
• http://www.homautomation.org/2014/03/06/running-
atmega328-in-a-standalone-mode-without-arduino-
shield/

31

You might also like