[go: up one dir, main page]

0% found this document useful (0 votes)
63 views4 pages

Language Reference Fuctions

The document provides an overview of the main components of the Arduino language including structure, values, functions, data types, operators, and I/O functions. It lists the basic syntax elements like variables, constants, control structures, and functions like setup() and loop() as well as data types, arithmetic operators, comparison operators, and I/O functions for digital, analog, and advanced input/output.

Uploaded by

sridharparthipan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views4 pages

Language Reference Fuctions

The document provides an overview of the main components of the Arduino language including structure, values, functions, data types, operators, and I/O functions. It lists the basic syntax elements like variables, constants, control structures, and functions like setup() and loop() as well as data types, arithmetic operators, comparison operators, and I/O functions for digital, analog, and advanced input/output.

Uploaded by

sridharparthipan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Language Reference

Arduino programs can be divided in three main parts: structure, values (variables and constants),
and functions.

Structure

Variables

Functions

Constants

Digital I/O

setup()

loop()

HIGH | LOW

pinMode()

Control Structures

INPUT | OUTPUT|
INPUT_PULLUP

digitalWrite()

digitalRead()

true | false

if

if...else

for

switch case

while

do... while

void

break

boolean

analogReadResolution()

continue

char

analogWriteResolution()

return

unsigned char

goto

byte

tone()

int

noTone()

Further Syntax

Analog I/O

integer constants

floating point
constants

Data Types

analogReference()

analogRead()

analogWrite() - PWM

Due only

Advanced I/O

; (semicolon)

unsigned int

shiftOut()

{} (curly braces)

word

shiftIn()

// (single line

comment)

long

/* */ (multi-line
comment)

unsigned long

short

millis()

float

micros()

double

delay()

string - char array

delayMicroseconds()

String - object

array

min()

Conversion

max()

#define

#include

Arithmetic Operators

= (assignment
operator)

pulseIn()

Time

Math

+ (addition)

- (subtraction)

* (multiplication)

char()

abs()

/ (division)

byte()

constrain()

% (modulo)

int()

map()

word()

pow()

sqrt()

Comparison Operators

== (equal to)

long()

!= (not equal to)

float()

< (less than)

> (greater than)

<= (less than or


equal to)

>= (greater than or


equal to)

Boolean Operators

Variable Scope &


Qualifiers

variable scope

static

volatile

const

Trigonometry

sin()

cos()

tan()

Random Numbers

randomSeed()

random()

&& (and)

|| (or)

! (not)

Utilities

Bits and Bytes

sizeof()

Pointer Access Operators

* dereference
operator

& reference operator

Bitwise Operators

& (bitwise and)

| (bitwise or)

^ (bitwise xor)

lowByte()

highByte()

bitRead()

bitWrite()

bitSet()

bitClear()

bit()

External Interrupts

~ (bitwise not)

attachInterrupt()

detachInterrupt()

Interrupts

<< (bitshift left)

>> (bitshift right)

interrupts()

noInterrupts()

Compound Operators
Communication

++ (increment)

-- (decrement)

+= (compound
addition)

-= (compound
subtraction)

*= (compound
multiplication)

Serial

Stream

USB (Leonardo and Due only)

Keyboard

Mouse

/= (compound
division)

&= (compound
bitwise and)

|= (compound
bitwise or)

You might also like