A Beginner's Arduino Guide/Arduino Language
The Arduino Language is the set of words, expressions and rules that are used to create Arduino Sketches.
The Arduino Language is based on C and C++
The Arduino Language allows for the use of any functions from the 'AVR Libc' which is a subset of the standard C library for Atmel AVR 8-bit RISC micro-controllers
The language is made up of keywords that are written based on rules.
Arduino Keywords
[edit | edit source]The keywords used to create the sketches can be divided into three types- Functions ,Structures and Values ( Values can be either Constants or Variables).
Below are a non-exhaustive list of standard Arduino sketch words, to add words, new libraries can be imported into the IDE.
Functions
[edit | edit source]Functions are small groups of code that do a single task or group of tasks (they have one function). They include
Category | Keyword |
---|---|
Digital I/O |
|
Analog I/O |
|
Due & Zero only |
|
Advanced I/O |
|
Time |
|
Math |
|
Trigonometry |
|
Characters |
|
Random Numbers |
|
Bits and Bytes |
|
External Interrupts |
|
Interrupts |
|
Communication |
|
USB (32u4 based boards and Due/Zero only) |
|
Structures these are words used to create a flow or structure in the program. they include
Category | Keyword |
---|---|
Overall Structure |
|
Control Structures |
|
Arithmetic Operators |
|
Comparison Operators |
|
Boolean Operators |
|
Bitwise Operators |
|
Compound Operators |
|
Pointer Access Operators |
|
Syntax |
|
Values
[edit | edit source]These act like containers and hold a certain value they may be constant which implies a container whose value that doesn't change throughout the program or a variable, which implies a container whose value that does change.
Category | Keyword |
---|---|
Constants |
|
Data Types |
|
Conversion |
|
Variable Scope & Qualifiers |
|
Utilities |
|