Structure

  • setup()
  • loop()

Control Structures

  • if
  • if...else
  • for
  • switch case
  • while
  • do...while
  • break
  • continue
  • return
  • goto

Further Syntax

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

Arithmetic Operators

  • = (assignment operator)
  • + (addition)
  • - (subtraction)
  • * (multiplication)
  • / (division)
  • % (modulo)

Comparison Operators

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

Boolean Operators

  • && (and)
  • || (or)
  • ! (not)

Pointer Access Operators

  • * (dereference operator)
  • & (reference operator)

Bitwise Operators

  • & (bitwise and)
  • | (bitwise or)
  • ^ (bitwise xor)
  • ~ (bitwise not)

Compound Operators

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

Variables

Constants

  • HIGH, LOW
  • INPUT, OUTPUT, INPUT_PULLUP
  • true, false

Data Types

  • void
  • boolean
  • char
  • unsigned char
  • byte
  • int
  • unsigned int
  • word
  • dword
  • float
  • s_pin (fast pin mode)

Variable Scope & Qualifiers

  • variable scope
  • const

Functions

Digital I/O

  • pinMode()
  • digitalWrite()
  • digitalRead()

Analog I/O

  • analogRead() — ADC
  • analogReadResolution()
  • analogReference()
  • analogWrite() — PWM
  • analogWriteResolution()

Advanced I/O

  • pulseIn()

Time

  • millis()
  • delay()
  • delayMicroseconds()

Math

  • min(), max(), abs(), round()
  • constrain(), map()
  • Bitmask operations — bitRead(), bitSet(), bitClear(), bitWrite()
  • lowByte() and highByte()
  • Power, exponent logarithm — pow(), exp(), log(), log10()
  • sqrt() sq()
  • Trigonometry and hyperbolic — sin(), cos(), ... radians(), degrees()

Communication

  • Serial (USB and UART)
  • Wire (I2C)
  • SPI
  • 1-Wire
  • IR

Interrupts

  • External interrupts
    (INT0, INT1, ZEROX)
    • zunoExtIntMode()
    • ZUNO_SETUP_ISR_INT0()
    • ZUNO_SETUP_ISR_INT1()
    • ZUNO_SETUP_ISR_ZEROX()
  • General Purpose Timer
    • zunoGPTInit()
    • zunoGPTEnable()
    • zunoGPTSet()
    • ZUNO_SETUP_ISR_GPTIMER()
  • 1 ms Timer
    • ZUNO_SETUP_ISR_1MSTIMER()

Non-volatile memory

  • EEPROM
  • NZRAM (non-volatile RAM in sleeping devices)

Looking for something else?

See the list of community-contributed libraries for interfacing with particular types of hardware.

Z-Wave

Exposing device functionality

  • ZUNO_SETUP_CHANNELS()
  • ZUNO_SWITCH_BINARY()
  • ZUNO_SWITCH_MULTILEVEL()
  • ZUNO_SENSOR_BINARY()
  • ZUNO_SENSOR_MULTILEVEL()
  • ZUNO_METER()
  • ZUNO_BLINDS()
  • ZUNO_FLOWSTOP()
  • ZUNO_SIREN()

Reporting values

  • zunoSendReport()

Controlling other devices

  • ZUNO_SETUP_ASSOCIATIONS()
  • zunoSendToGroupSetValueCommand()
  • zunoSendToGroupDimmingCommand()
  • zunoSendToGroupScene()
  • zunoSendToGroupDoorlockControl()
  • zunoSendAssociationCommand()

Power management

  • ZUNO_SETUP_SLEEPING_MODE()
  • zunoSendDeviceToSleep()
  • zunoSetBeamCountWU()
  • zunoSetWUOptions()
  • zunoGetWakeReason()
  • ZUNO_SETUP_BATTERY_LEVELS()
  • ZUNO_SETUP_BATTERY_HANDLER()

Inclusion in controller

  • zunoStartLearn()

Debug Mode

  • ZUNO_SETUP_DEBUG_MODE()

IDE settings

  • Frequency
  • MultiCommand
  • Security

Dynamic configuration

  • ZUNO_START_CONFIG()
  • ZUNO_ADD_CHANNEL()
  • ZUNO_ADD_ASSOCIATION()
  • ZUNO_COMMIT_CONFIG()
  • ZUNO_GET_CONFIG_STATE()

Configuration parameters

  • ZUNO_SETUP_CFGPARAMETER_HANDLER()
  • zunoLoadCFGParam()
  • zunoSaveCFGParam()