Arduino programming language C++

Terug

Language Reference
Arduino-programmeertaal kan worden onderverdeeld in drie hoofddelen: functies, waarden (variabelen en constanten) en structuur.

Functions
Voor het besturen van het Arduino-bord en het uitvoeren ervan


Computations.


Digital I/O

digitalRead()    
digitalWrite()   
pinMode() 

Naar Index

Analog I/O

analogReadResolution()
analogWriteResolution()
analogRead()
analogWrite()
analogReference()

Naar Index

Advanced I/O

noTone()
pulseIn()
pulseInLong()
shiftIn()
shiftOut()
tone()

Naar Index

Time

delay()
delayMicroseconds()
micros()
millis()

Naar Index

Math

abs()
constrain()
map()
max()
min()
pow()
sq()
sqrt()

Naar Index

Trigonometry

cos()
sin()
tan()

Naar Index

Characters

isAlpha()
isAlphaNumeric()
isAscii()
isControl()
isDigit()
isGraph()
isHexadecimalDigit()
isLowerCase()
isPrintable()
isPunct()
isSpace()
isUpperCase()
isWhitespace()

Naar Index

Random Numbers

random()
randomSeed()

Naar Index

Bits and Bytes

bit()
bitClear()
bitRead()
bitSet()
bitWrite()
highByte()
lowByte()

Naar Index

External Interrupts

attachInterrupt()
detachInterrupt()
digitalPinToInterrupt()

Naar Index

Interrupts

interrupts()
noInterrupts()

Naar Index

Communication

serial
SPI
print
stream
wire

Naar Index

USB

Keyboard
Mouse

Naar Index

Variables
Arduino data types and constants.

Constants

HIGH | LOW
INPUT | INPUT_PULLUP | OUTPUT
true | false
Floating Point Constants
Integer Constants
LED_BUILTIN

Naar Index

Conversion

(unsigned int)g)
(unsigned long)
byte()
char()
float()
int()
long()
word()

Naar Index

Data Types

array
bool
boolean
byte
char
double
float
int
long
short
size_t
string
String()
unsigned char
unsigned int
unsigned long
void
word

Naar Index

Variable Scope & Qualifiers

const
scope
static
volatile

Naar Index

Utilities

PROGMEM
sizeof()

Naar Index

Structure
The elements of Arduino (C++) code.

Sketch

loop()
setup()

Naar Index

Control

break
continue
do…while
else
for
goto
if
return
switch…case
while

Naar Index

Further Syntax

#define
#include
/* */ (block comment)
// (single line comment)
; (semicolon)
{} (curly braces)

Naar Index

Arithmetic Operators

% (remainder)
* (multiplication)
+ (addition)
– (subtraction)
/ (division)
= (assignment operator)

Naar Index

Comparison Operators

!= (not equal to)
< (less than)
<= (less than or equal to)
== (equal to)
> (greater than)
>= (greater than or equal to)

Naar Index

Boolean Operators

! (logical NOT)
&& (logical AND)
|| (logical OR)

Naar Index

Pointer Access Operators

& (reference operator)
* (dereference operator)

Naar Index

Bitwise Operators

& (bitwise AND)
<< (bitshift left)
>> (bitshift right)
^ (bitwise XOR)
| (bitwise OR)
~ (bitwise NOT)

Naar Index

Compound Operators

+= (compound addition)
&= (compound bitwise AND)
|= (compound bitwise OR)
|= (compound bitwise OR)
/= (compound division)
*= (compound multiplication)
%= (compound remainder)
-= (compound subtraction)
— (decrement)
++ (increment)

Naar Index

Scroll naar boven