0% found this document useful (0 votes)
42 views

Language Reference: Functions

Uploaded by

henriqueadv
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Language Reference: Functions

Uploaded by

henriqueadv
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

12/14/2017 Arduino Reference

SIGN IN HOME BUY SOFTWARE

Language Reference
Arduino programming language can be divided in three main parts: structure, values
(variables and constants), and functions.

FUNCTIONS
For controlling the Arduino board and performing computations.

Digital I/O Math Random Numbers


digitalRead() abs() random()
digitalWrite() constrain() randomSeed()
pinMode() map()
max() Bits and Bytes
Analog I/O min() bit()
analogRead() pow() bitClear()
analogReference() sq() bitRead()
analogWrite() sqrt() bitSet()
bitWrite()
Zero, Due & MKR Family Trigonometry highByte()
analogReadResolution() cos() lowByte()
analogWriteResolution() sin()
tan() External Interrupts
Advanced I/O attachInterrupt()
noTone() Characters detachInterrupt()
pulseIn() isAlpha()
pulseInLong() isAlphaNumeric() Interrupts
shiftIn() isAscii() interrupts()
shiftOut() isControl() noInterrupts()
tone() isDigit()
isGraph() Communication
Time isHexadecimalDigit() serial
delay() isLowerCase() stream
delayMicroseconds() isPrintable()
micros() isPunct() USB
millis() isSpace() Keyboard
isUpperCase() Mouse
isWhitespace()

https://www.arduino.cc/reference/en/ 1/3
12/14/2017 Arduino Reference

SIGN IN HOME BUY SOFTWARE


VARIABLES
Arduino data types and constants.

Constants Data Types Variable Scope & Qualifiers


Floating Point Constants String() const
Integer Constants array scope
HIGH | LOW boolean static
INPUT | OUTPUT | byte volatile
INPUT_PULLUP char
LED_BUILTIN double Utilities
true | false float PROGMEM
int sizeof()
long
Conversion
short
byte() string
char() unsignedChar
float() unsignedInt
int() unsignedLong
long() void
word() word

PRODUCTS LEARNING COMMUNITY SUPPORT SIGN IN

LANGUAGE
STRUCTURE
FUNCTIONS
The elements of Arduino (C++) code.
VARIABLES

STRUCTURE Sketch Further Syntax Comparison Operators


loop() #define (define) != (not equal to)
LIBRARIES
setup() #include (include) < (less than)
GLOSSARY
/* */ (block comment) <= (less than or equal to)

The Arduino Reference text is


Control Structure // (single line comment) == (equal to)
licensed under a Creative ; (semicolon) > (greater than)
break
Commons Attribution-Share Alike
3.0 License. continue {} (curly braces) >= (greater than or equal to)
Find anything that can be do...While
improved? Suggest corrections
else Arithmetic Operators Boolean Operators
and new documentation via
GitHub. for % (modulo) ! (logical not)
Doubts on how to use Github? goto * (multiplication) && (logical and)
Learn everything you need to
know in this tutorial. if...else + (addition) || (logical or)
return - (subtraction)
switchCase / (division) Pointer Access Operators
while = (assignment operator) & (reference opearator)
* (dereference operator)

https://www.arduino.cc/reference/en/ 2/3
12/14/2017 Arduino Reference

SIGN IN HOME BUY S O F T W A Bitwise


RE Operators
& (bitwise and)
<< (bitshift left)
>> (bitshift right)
^ (bitwise xor)
| (bitwise or)
~ (bitwise not)

Compound Operators
&= (compound bitwise and)
*= (compound multiplication)
++ (increment)
+= (compound addition)
-- (decrement)
-= (compound subtraction)
/= (compound division)
|= (compound bitwise or)

NEWSLETTER

ENTER YOUR EMAIL TO SIGN UP SUBSCRIBE

Copyright Notice
Contact Us

About Us
Careers

© 2017 Arduino

https://www.arduino.cc/reference/en/ 3/3

You might also like