In what language do you program an Arduino?
The programming language Arduino uses is very similar to C++, a common language in the computer world.
The code you learn to write for Arduino will be very similar to the code you write in another computer language. All basic concepts remain the same, it’s actually just a matter of learning to work with a different dialect.
When writing code for microcontrollers, performance is very important. That’s why you need strong and fast programming languages. C and C++ are among the most powerful languages you can find.
These are fairly fast and stable, and are therefore a good choice for microcontrollers.
The compiler used to convert code into object files is avr-g ++.
A program called avrdude is then used to upload the program to the Arduino microcontroller.
The Arduino programming language can be divided into three main components: functions, values (variables and constants) and structure.
Writing the Arduino codes happens in English. All functions are in English
Digital I/O
Advanced I/O
noTone()
pulseIn()
pulseInLong()
shiftin()
shiftout()
tone()
Bits and Bytes
bit()
bitClear()
bitRead()
bitset()
bitwrite()
highByte()
lowByte()
Analog I/O
Zero, Due & MKR Family
Characters (disambiguation)
isAlpha()
isAlphaNumeric()
isAscii()
isControl()
isDigit()
isGraph()
isHexadecimalDigit()
isLowerCase()
isPrintable()
isPunct()
isSpace()
isUpperCase()
isWhitespace()
External Interrupts
Interrupts
Random Numbers
Variables
Variables are Arduino data types and constants.
The variables are indicated in blue in the code.
Constants
Floating Point Constants
Integer Constants
HIGH | LOW
INPUT | OUTPUT | INPUT_PULLUP
LED_BUILTIN
true | false
Conversion
(unsigned int)
(unsigned long)
byte()
char()
float()
int()
long()
word()