Arduino Tutorials
Arduino Tutorials
ARDUINO
tutorialspoint
www.tutorialspoint.com
ttps://www.facebook.com/tutorialspointindia https://twitter.com/tutorialspoint
Arcluino
Audience
or hobbyists. With Arduino, one can get
This tutorial is intended for enthusiastic students very quickly and can start building
to know the basics of micro-controllersand sensors
prototype with very little investment.
Before you start proceedingwith this tutorial, we assume that you are already familiar
with the basics of C and C++. If you are not well aware of these concepts, then we will
suggest you go through our short tutorials on C and C++. A basic understanding of
microcontrollersand electronics is also expected.
tutorialspoint
Arduino
Tableof
About the Tutorial ...........
Audience...
Prerequisites.........................
Copyright & Disclaimer......
Table of Contents ..... . ii
ARDUINO- BASICS
L. Arduino —Overview
v.B6å7d Types ........
uino —Installation
26
7k-—AfÖuino—Operators
26
Arithmetic Operators..........
• ..... ........ 27
Comparison Operators .....................„.
Boolean Operators ..........................„
.................. 29
.......... 30
Bitwise Operators........................„••••
• ....... 31
Compound Operators.............
rduino —Loops 42
ij
tutorialspoint
Arduino
... 42
while loop ....
do...while loop
for loop ....
Nested Loop
. 45
Infinite loop
Arduino - Functions
48
Function Declaration ..
. Arduino —Strings
51
String Character Arrays..............
• 52
Manipulating String
Functions to Manipulate String Arrays ......
Array Bounds ..................
59
Arduino —String Object
59
What is an Object? .....
When to Use a String Object ...........
62
13. Arduino —Time
.62
delay() function ........................
63
delayMicroseconds() function ........
.63
millis() function..................
... ... 64
micros() function
66
4. Arduino —Arrays
Declaring Arrays .........
Examples Using Arrays ..............
70
Arduino —Passing Arrays to Functions ... ..... •
... 73
Multidimensional Arrays ..........
78
ARDUINO - FUNCTION LIBRARIES
79
5. Arduino —I/O Functions
.. ..... ..... ..... .... 79
Pins Configured as INPUT ........
.. 79
Pull-up Resistors
• •• .. ............ 80
Pins Configured as OUTPUT...........................„
. 80
pinMode() Function
• ........... 81
digitalWrite() Function
analogRead( ) function
84
16 duino —Advanced I/O Function ... ........... 84
•
analogReference() Function
86
Functions
17. Arduino —Character .87
Examples.....
93
Arduino —Math Library . ...93
Library Macros............„•••••••••••• .... ............... 95
Library Functions . 99
Example
101
Functions
19. rduino —Trigonometric
tutorialspoint
Arduino
iv
tutorialspoinc
Arduino
ARDUINO —SENSORS
11
—Humidity Sensor
tutorialspoint