Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Umyo rf24

uMyo_RF24
Sensors
          Allows to get data from uMyo devices using nRF24 module.

          Receives data from uMyo devices using nRF24 module and makes them available - requires installed RF24 library.

          Author: the_3d6 from Ultimate Robotics
          Maintainer: hi@ultimaterobotics.com.ua
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases


it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.0.3
            (latest)

1.0.2
1.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Nrotary

NRotary
Signal Input/Output
          NRotary library for using rotary encoders.

          This library makes using Rotary encoders easier and cleaner, uses interrupts.

          Author: Narwhalsss360
          Maintainer: Narwhalsss360
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.


the
          Arduino IDE and install it from there.
1.0.1
            (latest)

1.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Pca9698

PCA9698
Signal Input/Output
          GPIO I2C driver for PCA9698

          library supporting I2C speed up to 1 Mhz. It uses the wire library from Arduino.

          Author: Justin P.
          Maintainer: Justin P.
Read the documentation
Compatibility
This library is compatible with the avr
          architecture so you
          should be able to use it on the
          following Arduino boards:
Arduino Micro
Arduino Leonardo
Arduino Mega
Arduino Nano
Arduino Uno
Arduino Yún
Compatibility Note


Arduino Leonardo
Arduino Mega
Arduino Nano
Arduino Uno
Arduino Yún
Compatibility Note
Note: while the library is supposed to compile correctly on these architectures,
          it might require specific hardware features that may be available only on some boards.

Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.0.4
            (latest)

1.0.3
1.0.2
1.0.1


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Arduinothread

ArduinoThread
Timing
          A simple way to run Threads on Arduino

          This Library helps to maintain organized and to facilitate the use of multiple tasks. We can use Timers Interrupts, and make it really powerfull, running "pseudo-background" tasks on the rug.

          Author: Ivan Seidel
          Maintainer: Ivan Seidel
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in


boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
2.1.1
            (latest)

2.1.0
2.0.3
2.0.2
2.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Gadget shield

Gadget_Shield
Sensors
          Gadget Shield implemented for AVR (Uno, Nano, Leonardo, Mega).

          A multifunctional shield to demonstrate multifaceted useful capabilities.

          Author: Rugged Circuits
          Maintainer: Phillip Stevens
Read the documentation
Compatibility
This library is compatible with the avr
          architecture so you
          should be able to use it on the
          following Arduino boards:
Arduino Micro
Arduino Leonardo
Arduino Mega
Arduino Nano
Arduino Uno
Arduino Yún
Compatibility Note


Arduino Leonardo
Arduino Mega
Arduino Nano
Arduino Uno
Arduino Yún
Compatibility Note
Note: while the library is supposed to compile correctly on these architectures,
          it might require specific hardware features that may be available only on some boards.

Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
2.0.0-0
            (latest)


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Ieee754tools

IEEE754tools
Data Processing
          Fast helper functions for IEEE754 floats.

          Author: Rob Tillaart
          Maintainer: Rob Tillaart
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
0.2.4
            (latest)

0.2.3
0.2.2


(latest)

0.2.3
0.2.2
0.2.1
0.2.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Munet

munet
Data Processing
          Modules for Wifi connectivity, NTP, OTA, MQTT on ESP32/ESP8266 compatible with muwerk scheduler, serial link for other platforms

          Modular networking libraries for ESP32 and ESP8266 providing muwerk scheduler tasks for WiFi connection, Access Point Mode, NTP time sync, OTA software update and MQTT communication. Non-network hardware support via serial links. Requires: ustd, muwerk, Arduino_JSON and PubSubClient

          Author: Dominik Schlösser, Leo Moll


Author: Dominik Schlösser, Leo Moll
          Maintainer: Dominik Schlösser,
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
0.4.1
            (latest)

0.4.0
0.3.2
0.3.1
0.3.0
0.2.1
0.2.0
0.1.11
0.1.10
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.1


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Dynahtml

dynaHTML
Communication
          dynamic HTML library for ESP8266/ESP32

          I use part of milligram.css to style the HTML input type of text and checkbox that can be dynamically created.  Setup your HTML form fields using the specified struct and the class will generate the HTML for use with the ESPAsyncWebServer library.

          Author: Trey Aughenbaugh
          Maintainer: Trey Aughenbaugh
Read the documentation
Compatibility
This library is compatible with the esp8266, esp32
          architectures.

        Releases


architectures.

        Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.2.5
            (latest)

1.2.4
1.2.3
1.2.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Dfrobot urm07

DFRobot_URM07
Sensors
          A range sensor(SKU:SEN0153)

          Compatible with all Arduino platforms

          Author: DFRobot
          Maintainer: PengKaixing
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.0.0
            (latest)


1.0.0
            (latest)


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Zaber binary

Zaber Binary
Communication
          Provides helpers for interacting with Zaber devices using the Zaber Binary protocol.

          This library allows for issuing commands and receiving responses to and from Zaber devices, using either the Zaber shield or other serial shields.

          Author: Alice Foster
          Maintainer: Zaber Support
Read the documentation
Go to repository
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in


boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.2.0
            (latest)

1.1.1
1.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Adafruit tsc2007

Adafruit TSC2007
Sensors
          Arduino library for the TSC2007 resistive touch screen drivers in the Adafruit shop

          Author: Adafruit
          Maintainer: Adafruit
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.0.0
            (latest)


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Grafanaloki

GrafanaLoki
Communication
          Send logs/events to Grafana Loki

          Loki is a very flexible, easy to run Log aggregation tool. With this library you can send logs/events directly to a Loki server. Check out the project link for more info.

          Author: Ed Welch
          Maintainer: Grafana
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the


Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
0.2.2
            (latest)

0.1.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Serialwombat

SerialWombat
Uncategorized
          A library to drive the Serial Wombat Family by UART or I2C.


The Serial Wombat is a Smart I/O Expansion chip for Arduino, Raspberry Pi, CircuitPython, native embedded systems, PC, or any other system that can communicate by UART or I2C.  Learn more at www.SerialWombat.com .  The Serial Wombat is open-source firmware on a microcontroller.  The firmware is available at: https://github.com/BroadwellConsultingInc/SerialWombat.  This library syncs with Serial Wombat 4B firmware 2.0.3 and Serial Wombat 18AB firmware 2.0.8

          Author: Broadwell Consulting Inc
          Maintainer: Broadwell Consulting Inc
Read the documentation
Go to repository
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the


Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
2.0.8
            (latest)

2.0.7
2.0.6
2.0.5
2.0.4
2.0.2
2.0.1
1.0.10
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Esp8266sdupdater

ESP8266SDUpdater
Uncategorized
          SD Card Loader for ESP8266

          Author: tobozo@noreply.github.com
          Maintainer: tobozo@noreply.github.com
Read the documentation
Go to repository
Compatibility
This library is compatible with the esp8266
          architecture.

        Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
0.0.2
            (latest)

0.0.1


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Matrix mini library

Matrix Mini Library
Device Control
          An Arduino based robot controller.

          with the Matrix building system, you can make tons of projects. From basic tracking car to omni-directional mobile platform, you can make any ideas comes out of your mind.

          Author: KKITC
          Maintainer: Matrix Robotics & KKITC
Read the documentation
Go to repository
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases


it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
2.4.3
            (latest)

2.4.2
2.4.1
2.4.0
2.3.2
2.3.1
2.2.1
2.2.0
2.1.0
1.1.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Cubigel

Cubigel
Device Control
          Read information from the Cubigel compressor system

          Author: https://github.com/SV-Zanshin
          Maintainer: https://github.com/SV-Zanshin
Read the documentation
Go to repository
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.0.3
            (latest)


1.0.3
            (latest)

1.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Ghaemshopsmsim

ghaemShopSmSim
Communication
          arduino SMS Remote Controler over ghaemShopSmSim protocol

          Use this library to send and receive SMS with the SIM900A GSM module.This library allows you to control of any thing same as Relay and Sensors remotely.refer to http://ghaemShop.ir Tutorials.
First pubish date is: @1396-02-31

          Author: Akbar Ghaedi
          Maintainer: Akbar Ghaedi
Read the documentation
Go to repository
Compatibility


Maintainer: Akbar Ghaedi
Read the documentation
Go to repository
Compatibility
This library is compatible with the avr
          architecture so you
          should be able to use it on the
          following Arduino boards:
Arduino Micro
Arduino Leonardo
Arduino Mega
Arduino Nano
Arduino Uno
Arduino Yún
Compatibility Note
Note: while the library is supposed to compile correctly on these architectures,
          it might require specific hardware features that may be available only on some boards.

Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
3.1.0
            (latest)


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Https server generic

HTTPS_Server_Generic
Communication
          This is HTTPS/HTTP Server Library for ESP32, WT32_ETH01, ESP32 + LwIP W5500, ESP32 + LwIP W6100, ESP32 + LwIP ENC28J60

          In the future, this library will support powerful-enough boards using LwIP WiFi/Ethernet, such as ESP8266, Portenta_H7, RP2040W, Teensy 4.1, etc.

          Author: Frank Hessel,Khoi Hoang


Author: Frank Hessel,Khoi Hoang
          Maintainer: Khoi Hoang
Read the documentation
Compatibility
This library is compatible with the esp32
          architecture.

        Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.5.0
            (latest)

1.4.0
1.3.0
1.2.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Cloud4rpi esp arduino

cloud4rpi-esp-arduino
Communication
          Connect a board to the Cloud4RPi control panel using MQTT - https://cloud4rpi.io.

          Cloud4RPi client library for ESP8266 and ESP32 based boards. Dependencies: ArduinoJson, PubSubClient.

          Author: Cloud4RPi
          Maintainer: Cloud4RPi
Read the documentation
Compatibility
This library is compatible with the esp8266, esp32
          architectures.

        Releases


architectures.

        Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.1.0
            (latest)

1.0.3
1.0.2
1.0.1
0.1.0
0.0.10
0.0.9
0.0.6
0.0.5
0.0.3


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Hamqttdevice

HAMqttDevice
Communication
          A library that provides tools to simplify MQTT discovery implementation for Home Assistant

          Author: Patrick Lapointe
          Maintainer: Patrick Lapointe
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.4.0
            (latest)

1.3.0
1.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Escornabot library

Escornabot-Library
Other
          Librería para Escornabot

          Conjunto de valores y funciones para facilitar su uso y testeo

          Author: Digital Codesign
          Maintainer: Digital Codesign
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.0.0


the
          Arduino IDE and install it from there.
1.0.0
            (latest)


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Grove i2c thermocouple amplifier mcp9600

Grove - I2C Thermocouple Amplifier MCP9600
Sensors
          Arduino library to control Grove Temperature sensor MCP9600.

          Author: Seeed Studio
          Maintainer: Seeed Studio
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Sparkfun avr isp programming library

SparkFun AVR ISP Programming Library
Other
          A low level library to allow you to program AVR ISP devices from another device

          A low level library to allow you to program AVR ISP devices from another device.We wrote this library for internal use at SparkFun, but we have made it public just in case you find it useful too.

          Author: SparkFun Electronics
          Maintainer: SparkFun Electronics
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino


it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.0.0
            (latest)


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Sparkfun adin1110 arduino library

SparkFun ADIN1110 Arduino Library
Communication
          Driver for ADIN1110 Single Pair Ethernet

          This library allows the user to send and recieve data using single pair ethernet. Basic control is provided in the provided SinglePairEthernet Class. This allows the user to set the device MAC address, initialize, and sent and recieve data. If more control over the ADIN1110 is desired, the advanced class is provided.

          Author: SparkFun Electronics
          Maintainer: Kyle Wenner
Read the documentation


Author: SparkFun Electronics
          Maintainer: Kyle Wenner
Read the documentation
Go to repository
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.0.0
            (latest)


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Stm32duino spbtle rf

STM32duino SPBTLE-RF
Communication
          This library includes drivers for ST's BlueNRG/BlueNRG-MS Bluetooth Low Energy device.

          This library is built for STM32 microcontrollers and comes with examples of implementation of the BLE drivers.

          Author: STMicroelectronics, AMS, Wi6Labs
          Maintainer: stm32duino
Read the documentation
Compatibility
This library is compatible with the stm32
          architecture.

        Releases
To use this library, open the Library Manager in


architecture.

        Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.0.3
            (latest)

1.0.2
1.0.1


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Touchkeypad

TouchKeypad
Display
          A keypad for touchscreens.

          Provides (relatively) easy creation of a keypad touch interface with events fired (touch and repeat touch) with visual feedback of touch interactions.

          Author: Philip Fletcher
          Maintainer: Philip Fletcher
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.


the
          Arduino IDE and install it from there.
0.0.6
            (latest)

0.0.5
0.0.4
0.0.3
0.0.2
0.0.1


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Sensirion sps

sensirion-sps
Sensors
          Support for Sensirion's SPS30 particulate matter sensor

          The SPS30 has mass concentrations for pm1, pm2.5, pm4, and pm10, plus number concentrations for pm0.5, pm1, pm2.5, pm4, and pm10

          Author: Johannes Winkelmann
          Maintainer: Johannes Winkelmann
Read the documentation
Go to repository
Compatibility
This library is compatible with all architectures so you should be able to use


Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.1.0
            (latest)

1.0.0
0.9.0
0.0.6
0.0.5
0.0.3


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Bolder flight systems ams5915

Bolder Flight Systems AMS5915
Sensors
          Library for communicating with Analog Microelectronics AMS-5915 pressure transducers.

          This library supports I2C communication with the AMS-5915 retrieving pressure and temperature data at rates up to 2 kHz.

          Author: Brian Taylor
          Maintainer: Brian Taylor
Read the documentation
Go to repository
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases


it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
6.0.3
            (latest)

6.0.2
6.0.1
6.0.0
5.1.0
5.0.3
5.0.2
5.0.1
5.0.0
2.0.1
2.0.0
1.0.2
1.0.1


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Sram

SRAM
Data Storage
          Simple library for serial SRAM IC's

          Simple library for SPI Static RAM IC's like Microchip 23K256

          Author: panStamp
          Maintainer: panStamp
Read the documentation
Go to repository
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.0.1


the
          Arduino IDE and install it from there.
1.0.1
            (latest)


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Sensor communication library

Sensor Communication Library
Communication
          Arduino library for easy sensors data communication

          This library allow you to send filtered (mobile average) sensors data as a streeam of data in csv format.

          Author: IoThingsWare
          Maintainer: Toni Cafiero
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.


the
          Arduino IDE and install it from there.
0.4.0
            (latest)

0.3.0
0.2.0
0.1.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Nimble arduino

NimBLE-Arduino
Communication
          Bluetooth low energy (BLE) library for arduino-esp32 based on NimBLE.

          This is a more updated and lower resource alternative to the original bluedroid BLE library for esp32. Uses 50% less flash space and approximately 100KB less ram with the same functionality. Nearly 100% compatible with existing application code, migration guide included.

          Author: h2zero
          Maintainer: h2zero
Read the documentation
Compatibility


Maintainer: h2zero
Read the documentation
Compatibility
This library is compatible with the esp32, arm-ble
          architectures.

        Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.4.1
            (latest)

1.4.0
1.3.8
1.3.7
1.3.6
1.3.5
1.3.4
1.3.3
1.3.1
1.3.0
1.2.0
1.1.0
1.0.2
1.0.1
1.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Tamc gt911

TAMC_GT911
Display
          Arduino library for GT911

          Arduino library for GT911 Touch Panel

          Author: TAMC
          Maintainer: TAMC
Read the documentation
Compatibility
This library is compatible with the esp32
          architecture.

        Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.0.2
            (latest)

1.0.1
1.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Andee

Andee
Device Control
          Annikken Andee Library for Annikken Andee U, Android and iOS boards.

          Only supports Arduino Uno, Leonardo and Mega

          Author: Annikken Pte Ltd
          Maintainer: Annikken Pte Ltd
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.


the
          Arduino IDE and install it from there.
3.3.2
            (latest)

3.3.1
3.3.0
3.2.8
3.2.7
3.2.6
3.2.5
3.2.4
3.2.2
3.2.1
3.2.0
3.1.3
3.1.1


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Rakwireless storage

RAKwireless Storage
Data Storage
          Driver for WisBlock Storage modules

          Driver for WisBlock Storage RAK15000

          Author: RAKwireless
          Maintainer: RAKwireless
Read the documentation
Go to repository
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.0.2


the
          Arduino IDE and install it from there.
1.0.2
            (latest)

1.0.1
1.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Ovs

OVS
Data Processing
          Simple Arduino library for oversampling ADC and other data

          Author: AlexGyver
          Maintainer: AlexGyver
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.1.0
            (latest)

1.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Tcone

TCone
Timing
          MicroBeaut-TCone Library with Timer and Counter One.

          MicroBeaut-TCone Library provided Timer and Counter One interoperation with a subroutine for Arduino.

          Author: Montree Hamarn, Natvalun Tavepontakul
          Maintainer: Montree Hamarn
Read the documentation
Compatibility
This library is compatible with the avr
          architecture so you
          should be able to use it on the
          following Arduino boards:
Arduino Micro
Arduino Leonardo
Arduino Mega
Arduino Nano


following Arduino boards:
Arduino Micro
Arduino Leonardo
Arduino Mega
Arduino Nano
Arduino Uno
Arduino Yún
Compatibility Note
Note: while the library is supposed to compile correctly on these architectures,
          it might require specific hardware features that may be available only on some boards.

Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.0.1
            (latest)

1.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Rtc rv 3028 c7 arduino library

RTC RV-3028-C7 Arduino Library
Timing
          A library to drive the RV-3028-C7 extremely precise, extremely low power, real-time clock


The RV-3028-C7 is an extremely precise, extremely low power, highly configurable RTC. Under ideal conditions it runs at approximately 40nA with +/-5ppm per year of deviation (+/- 160 seconds worst case per year). This library was originally forked from the Sparkfun RV-1805 library, and costumized and enhanced to the RV-3028-C7.

          Author: Constantin Koch
          Maintainer: Constantin Koch - constantinkoch@outlook.com
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
2.1.0
            (latest)

2.0.1
2.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Tetrisanimation

TetrisAnimation
Display
          Library for drawing text out with tetris blocks

          Uses the Adafruit GFX library to draw tetris blocks into letters on displays.

          Author: Tobias Blum, Brian Lough
          Maintainer: Brian Lough
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.


the
          Arduino IDE and install it from there.
1.1.0
            (latest)


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Espectro32

ESPectro32
Communication
          ESPectro32 development board library for Arduino IDE

          The library for you to get up fast for using ESPectro32 dev board with Arduino IDE. ESPectro32 is designed by DycodeX, a leading Internet of Things (IoT) and disruptive technology company from Indonesia.

          Author: Andri Yadi
          Maintainer: DycodeX Team
Read the documentation
Compatibility
This library is compatible with the esp32
          architecture.

        Releases


Compatibility
This library is compatible with the esp32
          architecture.

        Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
0.2.0
            (latest)


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Hactimers

HaCTimers
Timing
          An event driven arduino Timer.

          An event driven Timer for arduino which can be used as Tick Tack, Tick & toggle, Up & Down Counter and Time ON/OFF delay.

          Author: Harvy Aronales Costiniano
          Maintainer: Harvy Aronales Costiniano
Read the documentation
Compatibility
This library is compatible with the esp8266, esp32
          architectures.

        Releases
To use this library, open the Library Manager in
          the


Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
0.1.4
            (latest)

0.1.2
0.1.1
0.1.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Gst

GST
Data Processing
          Arduino library for Golden Standard Test, confusion matrix.

          Author: Rob Tillaart
          Maintainer: Rob Tillaart
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
0.1.3
            (latest)

0.1.2
0.1.1
0.1.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Lsm6

LSM6
Sensors
          LSM6 accelerometer and gyro library

          This is a library for the Arduino IDE that helps interface with ST's LSM6DSO and LSM6DS33 accelerometer and gyro ICs.

          Author: Pololu
          Maintainer: Pololu
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.


the
          Arduino IDE and install it from there.
2.0.1
            (latest)

2.0.0
1.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Afarray

AFArray
Other
          Simple Array ADT for Arduino Framework with template.

          Very useful and smart Array ADT.

          Author: Andrea Tazio Giusti
          Maintainer: Andrea Tazio Giusti andreatgiusti@gmail.com
Read the documentation
Go to repository
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.


the
          Arduino IDE and install it from there.
0.4.0
            (latest)

0.3.1
0.2.2
0.2.0
0.1.1
0.1.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Tuyav

Tuyav
Uncategorized
          Communicate with the Tuya IoT module

          Communicate with the Tuya IoT module and make your arduino connect to eveything you want

          Author: Velleman nv
          Maintainer: Velleman nv
Read the documentation
Compatibility
This library is compatible with the avr, megaAVR, megaavr
          architectures so you
          should be able to use it on the
          following Arduino boards:
Arduino Micro
Arduino Leonardo
Arduino Mega
Arduino Nano
Arduino Nano Every
Arduino Uno


Arduino Micro
Arduino Leonardo
Arduino Mega
Arduino Nano
Arduino Nano Every
Arduino Uno
Arduino Uno WiFi REV2
Arduino Yún
Compatibility Note
Note: while the library is supposed to compile correctly on these architectures,
          it might require specific hardware features that may be available only on some boards.

Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.2.1
            (latest)

1.2.0
1.1.0
1.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Ustepper s lite

uStepper S-lite
Device Control
          Library offering support for uStepper S-lite

          uStepper support library

          Author: uStepper ApS
          Maintainer: Thomas Olsen (thomas@ustepper.com)
Read the documentation
Go to repository
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.


the
          Arduino IDE and install it from there.
1.2.0
            (latest)

1.1.0
1.0.0
0.1.1
0.1.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Usbmidi

USBMIDI
Communication
          USB MIDI library for Arduino.

          Provides USB MIDI functionality via the familiar Serial interface, porting existing code is trivial. Uses PluggableUSB library for devices that support it. Other AVR8 devices are supported by using V-USB library by Object Development (https://www.obdev.at/products/vusb/index.html). Since version 1.1.2, config for Digispark boards was added.

          Author: Blokas
          Maintainer: Giedrius Trainavičius
Read the documentation
Go to repository


Read the documentation
Go to repository
Compatibility
This library is compatible with the avr
          architecture so you
          should be able to use it on the
          following Arduino boards:
Arduino Micro
Arduino Leonardo
Arduino Mega
Arduino Nano
Arduino Uno
Arduino Yún
Compatibility Note
Note: while the library is supposed to compile correctly on these architectures,
          it might require specific hardware features that may be available only on some boards.

Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.1.6
            (latest)

1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Multi oled

Multi_OLED
Display
          Control multiple I2C OLED displays.

          Supports a combination of multiple bit-banged buses and addresses to handle any number of displays.

          Author: Larry Bank
          Maintainer: Larry Bank
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.0.0


the
          Arduino IDE and install it from there.
1.0.0
            (latest)


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Dfrobot mcp4725

DFRobot_MCP4725
Sensors
          12 bit digital-analog DA conversion module(SKU: DFR0552).

          This is a 12 bit digital-analog DA conversion module, I2C interface is easy to use and can output different waveforms.

          Author: DFRobot
          Maintainer: wxzed(xiao.wu@dfrobot.com),tangjie(jie.tang@dfrobot.com)
Read the documentation
Compatibility


Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.0.1
            (latest)


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Esp dash

ESP-DASH
Communication
          A blazing fast library to create realtime dashboards for ESP8266's and ESP32's.

          ESP-DASH lets you create functional and beautiful dashboards for your ESP8266 / ESP32 without the need of an internet connection.

          Author: Ayush Sharma
          Maintainer: Ayush Sharma
Read the documentation
Compatibility
This library is compatible with the esp8266, esp32
          architectures.

        Releases
To use this library, open the Library Manager in
          the


Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
4.0.1
            (latest)

4.0.0
3.0.8
3.0.7
3.0.6
3.0.5
3.0.4
3.0.3
3.0.2
3.0.0
2.2.5
2.2.4
2.2.2
2.2.1
2.2.0
2.1.5
2.1.4
2.0.4
2.0.3
2.0.2
2.0.0
1.0.3
1.0.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        Find anything that can be improved? Suggest corrections and new documentation via GitHub.
        Doubts on how to use Github? Learn everything you need to know in this tutorial.

Reference
            >  Libraries
            > Sodaq bmp085

Sodaq_BMP085
Sensors
          An Arduino library for the BMP085/BMP180 Barometric Pressure + Temp sensor

          Author: keestux,SODAQ
          Maintainer: Kees Bakker
Read the documentation
Compatibility
This library is compatible with all architectures so you should be able to use
          it on all the Arduino
          boards.
Releases
To use this library, open the Library Manager in
          the
          Arduino IDE and install it from there.
1.4.0
            (latest)


1.4.0
            (latest)

1.3.0
1.2.1
1.2.0


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Further syntax
            > Include

#include
          [Further Syntax]

Description
#include is used to include outside libraries in your sketch. This gives the programmer access to a large group of standard C libraries (groups of pre-made functions), and also libraries written especially for Arduino.


The main reference page for AVR C libraries (AVR is a reference to the Atmel chips on which the Arduino is based) is here.
Note that #include, similar to #define, has no semicolon terminator, and the compiler will yield cryptic error messages if you add one.
Syntax
#include <LibraryFile.h>
#include "LocalFile.h"
Parameters
LibraryFile.h: when the angle brackets syntax is used, the libraries paths will be searched for the file.
LocalFile.h: When the double quotes syntax is used, the folder of the file using the #include directive will be searched for the specified file, then the libraries paths if it was not found in the local path. Use this syntax for header files in the sketch’s folder.
Example Code
This example includes the Servo library so that its functions may be used to control a Servo motor.
#include <Servo.h>


#include <Servo.h>
Servo myservo;  // create servo object to control a servo
void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
}
void loop() {
  for (int pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
  for (int pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'


myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
}
See also


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Further syntax
            > Define

#define
          [Further Syntax]

Description


> Define

#define
          [Further Syntax]

Description
#define is a useful C++ component that allows the programmer to give a name to a constant value before the program is compiled. Defined constants in arduino don’t take up any program memory space on the chip. The compiler will replace references to these constants with the defined value at compile time.
This can have some unwanted side effects though, if for example, a constant name that had been #defined is included in some other constant or variable name. In that case the text would be replaced by the #defined number (or text).
In general, the const keyword is preferred for defining constants and should be used instead of #define.
Syntax
#define constantName value
Parameters
constantName: the name of the macro to define.
value: the value to assign to the macro.
Example Code
#define ledPin 3


value: the value to assign to the macro.
Example Code
#define ledPin 3
// The compiler will replace any mention of ledPin with the value 3 at compile time.
Notes and Warnings
There is no semicolon after the #define statement. If you include one, the compiler will throw cryptic errors further down the page.
#define ledPin 3; // this is an error
Similarly, including an equal sign after the #define statement will also generate a cryptic compiler error further down the page.
#define ledPin  = 3 // this is also an error
See also
LANGUAGE const
LANGUAGE Constants


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Further syntax
            > Blockcomment

/* */
          [Further Syntax]

Description


> Blockcomment

/* */
          [Further Syntax]

Description
Comments are lines in the program that are used to inform yourself or others about the way the program works. They are ignored by the compiler, and not exported to the processor, so they don’t take up any space in the microcontroller’s flash memory. Comments' only purpose is to help you understand (or remember), or to inform others about how your program works.
The beginning of a block comment or a multi-line comment is marked by the symbol /* and the symbol */ marks its end. This type of comment is called so as this can extend over more than one line; once the compiler reads the /* it ignores whatever follows until it encounters a */.
Example Code
/* This is a valid comment */
/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
  This example code is in the public domain.


This example code is in the public domain.
  (Another valid comment)
*/
/*
  if (gwb == 0) { // single line comment is OK inside a multi-line comment
    x = 3;          /* but not another multi-line comment - this is invalid */
  }
// don't forget the "closing" comment - they have to be balanced!
*/
Notes and Warnings
When experimenting with code, "commenting out" parts of your program is a convenient way to remove lines that may be buggy. This leaves the lines in the code, but turns them into comments, so the compiler just ignores them. This can be especially useful when trying to locate a problem, or when a program refuses to compile and the compiler error is cryptic or unhelpful.
See also


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Further syntax
            > Curlybraces

{}
          [Further Syntax]

Description
Curly braces (also referred to as just "braces" or as "curly brackets") are a major part of the C++ programming language. They are used in several different constructs, outlined below, and this can sometimes be confusing for beginners.


An opening curly brace { must always be followed by a closing curly brace }. This is a condition that is often referred to as the braces being balanced. The Arduino IDE (Integrated Development Environment) includes a convenient feature to check the balance of curly braces. Just select a brace, or even click the insertion point immediately following a brace, and its logical companion will be highlighted.
Beginner programmers, and programmers coming to C++ from the BASIC language often find using braces confusing or daunting. After all, the same curly braces replace the RETURN statement in a subroutine (function), the ENDIF statement in a conditional and the NEXT statement in a FOR loop.
Unbalanced braces can often lead to cryptic, impenetrable compiler errors that can sometimes be hard to track down in a large program. Because of their varied usages, braces are also incredibly important to the syntax of a program and moving a brace one or two lines will often dramatically affect the meaning of a program.
Example Code


Example Code
The main uses of curly braces are listed in the examples below.
Functions
void myfunction(datatype argument) {
  // any statement(s)
}
Loops
while (boolean expression) {
  // any statement(s)
}
do {
  // any statement(s)
} while (boolean expression);
for (initialisation; termination condition; incrementing expr) {
  // any statement(s)
}
Conditional Statements
if (boolean expression) {
  // any statement(s)
}
else if (boolean expression) {
  // any statement(s)
}
else {
  // any statement(s)
}
See also


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Further syntax
            > Semicolon

;
          [Further Syntax]

Description
Used to end a statement.
Example Code
int a = 13;
Notes and Warnings


Example Code
int a = 13;
Notes and Warnings
Forgetting to end a line in a semicolon will result in a compiler error. The error text may be obvious, and refer to a missing semicolon, or it may not. If an impenetrable or seemingly illogical compiler error comes up, one of the first things to check is a missing semicolon, in the immediate vicinity, preceding the line at which the compiler complained.
See also


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Further syntax
            > Singlelinecomment

//
          [Further Syntax]

Description


> Singlelinecomment

//
          [Further Syntax]

Description
Comments are lines in the program that are used to inform yourself or others about the way the program works. They are ignored by the compiler, and not exported to the processor, so they don’t take up any space in the microcontroller’s flash memory. Comments' only purpose is to help you understand (or remember), or to inform others about how your program works.
A single line comment begins with // (two adjacent slashes). This comment ends automatically at the end of a line. Whatever follows // till the end of a line will be ignored by the compiler.
Example Code
There are two different ways of marking a line as a comment:
// pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;


// give it a name:
int led = 13;
digitalWrite(led, HIGH);  // turn the LED on (HIGH is the voltage level)
Notes and Warnings
When experimenting with code, "commenting out" parts of your program is a convenient way to remove lines that may be buggy. This leaves the lines in the code, but turns them into comments, so the compiler just ignores them. This can be especially useful when trying to locate a problem, or when a program refuses to compile and the compiler error is cryptic or unhelpful.
See also


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Comparison operators
            > Lessthanorequalto

<=
          [Comparison Operators]

Description


<=
          [Comparison Operators]

Description
Compares the variable on the left with the value or variable on the right of the operator. Returns true when the operand on the left is less (smaller) than or equal to the operand on the right. Please note that you may compare variables of different data types, but that could generate unpredictable results, it is therefore recommended to compare variables of the same data type including the signed/unsigned type.
Syntax
x ⇐ y; // is true if x is smaller than or equal to y and it is false if x is greater than y
Parameters
x: variable. Allowed data types: int, float, double, byte, short, long.
y: variable or constant. Allowed data types: int, float, double, byte, short, long.
Example Code
if (x <= y) { // tests if x is less (smaller) than or equal to y


// do something only if the comparison result is true
}
Notes and Warnings
Negative numbers are smaller than positive numbers.
See also


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Comparison operators
            > Lessthan

<
          [Comparison Operators]

Description


> Lessthan

<
          [Comparison Operators]

Description
Compares the variable on the left with the value or variable on the right of the operator. Returns true when the operand on the left is less (smaller) than the operand on the right. Please note that you may compare variables of different data types, but that could generate unpredictable results, it is therefore recommended to compare variables of the same data type including the signed/unsigned type.
Syntax
x < y;  // is true if x is smaller than y and it is false if x is equal or bigger than y
Parameters
x: variable. Allowed data types: int, float, double, byte, short, long.
y: variable or constant. Allowed data types: int, float, double, byte, short, long.
Example Code
if (x < y) {  // tests if x is less (smaller) than y


// do something only if the comparison result is true
}
Notes and Warnings
Negative numbers are less than positive numbers.
See also


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Comparison operators
            > Equalto

==
          [Comparison Operators]

Description


> Equalto

==
          [Comparison Operators]

Description
Compares the variable on the left with the value or variable on the right of the operator. Returns true when the two operands are equal. Please note that you may compare variables of different data types, but that could generate unpredictable results, it is therefore recommended to compare variables of the same data type including the signed/unsigned type.
Syntax
x == y; // is true if x is equal to y and it is false if x is not equal to y
Parameters
x: variable. Allowed data types: int, float, double, byte, short, long.
y: variable or constant. Allowed data types: int, float, double, byte, short, long.
Example Code
if (x == y) { // tests if x is equal to y
  // do something only if the comparison result is true
}
See also


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Comparison operators
            > Greaterthan

>
          [Comparison Operators]

Description


> Greaterthan

>
          [Comparison Operators]

Description
Compares the variable on the left with the value or variable on the right of the operator. Returns true when the operand on the left is greater (bigger) than the operand on the right. Please note that you may compare variables of different data types, but that could generate unpredictable results, it is therefore recommended to compare variables of the same data type including the signed/unsigned type.
Syntax
x > y;  // is true if x is bigger than y and it is false if x is equal or smaller than y
Parameters
x: variable. Allowed data types: int, float, double, byte, short, long.
y: variable or constant. Allowed data types: int, float, double, byte, short, long.
Example Code
if (x > y) {  // tests if x is greater (bigger) than y


// do something only if the comparison result is true
}
Notes and Warnings
Positive numbers are greater than negative numbers.
See also


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Comparison operators
            > Greaterthanorequalto

>=
          [Comparison Operators]

Description


>=
          [Comparison Operators]

Description
Compares the variable on the left with the value or variable on the right of the operator. Returns true when the operand on the left is greater (bigger) than or equal to the operand on the right. Please note that you may compare variables of different data types, but that could generate unpredictable results, it is therefore recommended to compare variables of the same data type including the signed/unsigned type.
Syntax
x >= y; // is true if x is bigger than or equal to y and it is false if x is smaller than y
Parameters
x: variable. Allowed data types: int, float, double, byte, short, long.
y: variable or constant. Allowed data types: int, float, double, byte, short, long.
Example Code
if (x >= y) { // tests if x is greater (bigger) than or equal to y


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Comparison operators
            > Notequalto

!=
          [Comparison Operators]

Description


> Notequalto

!=
          [Comparison Operators]

Description
Compares the variable on the left with the value or variable on the right of the operator. Returns true when the two operands are not equal. Please note that you may compare variables of different data types, but that could generate unpredictable results, it is therefore recommended to compare variables of the same data type including the signed/unsigned type.
Syntax
x != y; // is false if x is equal to y and it is true if x is not equal to y
Parameters
x: variable. Allowed data types: int, float, double, byte, short, long.
y: variable or constant. Allowed data types: int, float, double, byte, short, long.
Example Code
if (x != y) { // tests if x is not equal to y
  // do something only if the comparison result is true
}
See also


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Pointer access operators
            > Dereference

*
          [Pointer Access Operators]

Description
Dereferencing is one of the features specifically for use with pointers. The asterisk operator * is used for this purpose. If p is a pointer, then *p represents the value contained in the address pointed by p.
Example Code


Example Code
int *p;       // declare a pointer to an int data type
int i = 5;
int result = 0;
p = &i;       // now 'p' contains the address of 'i'
result = *p;  // 'result' gets the value at the address pointed by 'p'
              // i.e., it gets the value of 'i' which is 5
Notes and Warnings
Pointers are one of the complicated subjects for beginners in learning C, and it is possible to write the vast majority of Arduino sketches without ever encountering pointers. However for manipulating certain data structures, the use of pointers can simplify the code, and knowledge of manipulating pointers is handy to have in one’s toolkit.
See also
DEFINITION Pointers


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Pointer access operators
            > Reference

&
          [Pointer Access Operators]

Description
Referencing is one of the features specifically for use with pointers. The ampersand operator & is used for this purpose. If x is a variable, then &x represents the address of the variable x.
Example Code


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Compound operators
            > Compounddivision

/=
          [Compound Operators]

Description
This is a convenient shorthand to perform division of a variable with another constant or variable.
Syntax
x /= y; // equivalent to the expression x = x / y;
Parameters


Syntax
x /= y; // equivalent to the expression x = x / y;
Parameters
x: variable. Allowed data types: int, float, double, byte, short, long.
y: non zero variable or constant. Allowed data types: int, float, double, byte, short, long.
Example Code
x = 2;
x /= 2; // x now contains 1
See also
LANGUAGE Normal Division


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Compound operators
            > Compoundmultiplication

*=
          [Compound Operators]

Description
This is a convenient shorthand to perform multiplication of a variable with another constant or variable.
Syntax
x *= y; // equivalent to the expression x = x * y;
Parameters


Syntax
x *= y; // equivalent to the expression x = x * y;
Parameters
x: variable. Allowed data types: int, float, double, byte, short, long.
y: variable or constant. Allowed data types: int, float, double, byte, short, long.
Example Code
x = 2;
x *= 3; // x now contains 6
See also
LANGUAGE Normal Multiplication


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Compound operators
            > Compoundremainder

%=
          [Compound Operators]

Description
This is a convenient shorthand to calculate the remainder when one integer is divided by another and assign it back to the variable the calculation was done on.
Syntax
x %= divisor;   // equivalent to the expression x = x % divisor;
Parameters


x %= divisor;   // equivalent to the expression x = x % divisor;
Parameters
x: variable. Allowed data types: int.
divisor: non zero variable or constant. Allowed data types: int.
Example Code
int x = 7;
x %= 5;    // x now contains 2
Notes and Warnings
The compound remainder operator does not work on floats.
If the first operand is negative, the result is negative (or zero).
Therefore, the result of x %= 10 will not always be between 0 and 9 if x can be negative.
See also
LANGUAGE Remainder


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Compound operators
            > Compoundbitwiseor

|=
          [Compound Operators]

Description
The compound bitwise OR operator |= is often used with a variable and a constant to "set" (set to 1) particular bits in a variable.
A review of the Bitwise OR | operator:


A review of the Bitwise OR | operator:
0  0  1  1    operand1
0  1  0  1    operand2
----------
0  1  1  1    (operand1 | operand2) - returned result
Syntax
x |= y; // equivalent to x = x | y;
Parameters
x: variable. Allowed data types: char, int, long.
y: variable or constant. Allowed data types: char, int, long.
Example Code
Bits that are "bitwise ORed" with 0 are unchanged, so if myByte is a byte variable,
myByte | 0b00000000 = myByte;
Bits that are "bitwise ORed" with 1 are set to 1 so:
myByte | 0b11111111 = 0b11111111;
Notes and Warnings


Notes and Warnings
Because we are dealing with bits in a bitwise operator - it is convenient to use the binary formatter with constants. The numbers are still the same value in other representations, they are just not as easy to understand. Also, 0b00000000 is shown for clarity, but zero in any number format is zero.
Consequently - to set bits 0 & 1 of a variable, while leaving the rest of the variable unchanged, use the compound bitwise OR operator (|=) with the constant 0b00000011
1  0  1  0  1  0  1  0    variable
0  0  0  0  0  0  1  1    mask
----------------------
1  0  1  0  1  0  1  1
bits unchanged
                 bits set


bits unchanged
                 bits set
Here is the same representation with the variables bits replaced with the symbol x
x  x  x  x  x  x  x  x    variable
0  0  0  0  0  0  1  1    mask
----------------------
x  x  x  x  x  x  1  1
bits unchanged
                 bits set
So if:
myByte = 0b10101010;
myByte |= 0b00000011 == 0b10101011;
See also
LANGUAGE | Bitwise OR


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Compound operators
            > Compoundbitwiseand

&=
          [Compound Operators]

Description
The compound bitwise AND operator &= is often used with a variable and a constant to force particular bits in a variable to the LOW state (to 0). This is often referred to in programming guides as "clearing" or "resetting" bits.


A review of the Bitwise AND & operator:
0  0  1  1    operand1
0  1  0  1    operand2
----------
0  0  0  1    (operand1 & operand2) - returned result
Syntax
x &= y; // equivalent to x = x & y;
Parameters
x: variable. Allowed data types: char, int, long.
y: variable or constant. Allowed data types: char, int, long.
Example Code
Bits that are "bitwise ANDed" with 0 are cleared to 0 so, if myByte is a byte variable,
myByte & 0b00000000 = 0;
Bits that are "bitwise ANDed" with 1 are unchanged so,
myByte & 0b11111111 = myByte;
Notes and Warnings


myByte & 0b11111111 = myByte;
Notes and Warnings
Because we are dealing with bits in a bitwise operator - it is convenient to use the binary formatter with constants. The numbers are still the same value in other representations, they are just not as easy to understand. Also, 0b00000000 is shown for clarity, but zero in any number format is zero (hmmm something philosophical there?)
Consequently - to clear (set to zero) bits 0 & 1 of a variable, while leaving the rest of the variable unchanged, use the compound bitwise AND operator (&=) with the constant 0b11111100
1  0  1  0  1  0  1  0    variable
1  1  1  1  1  1  0  0    mask
----------------------


----------------------
1  0  1  0  1  0  0  0
bits unchanged
                 bits cleared
Here is the same representation with the variable’s bits replaced with the symbol x
x  x  x  x  x  x  x  x    variable
1  1  1  1  1  1  0  0    mask
----------------------
x  x  x  x  x  x  0  0
bits unchanged
                 bits cleared
So if:
myByte = 0b10101010;
myByte &= 0b11111100;  // results in 0b10101000
See also
LANGUAGE & Bitwise AND


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Compound operators
            > Increment

++
          [Compound Operators]

Description
Increments the value of a variable by 1.
Syntax
x++;  // increment x by one and returns the old value of x
++x;  // increment x by one and returns the new value of x
Parameters


++x;  // increment x by one and returns the new value of x
Parameters
x: variable. Allowed data types: int, long (possibly unsigned).
Returns
The original or newly incremented value of the variable.
Example Code
x = 2;
y = ++x;  // x now contains 3, y contains 3
y = x++;  // x contains 4, but y still contains 3
See also


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Compound operators
            > Compoundsubtraction

-=
          [Compound Operators]

Description
This is a convenient shorthand to perform subtraction of a constant or a variable from a variable.
Syntax
x -= y; // equivalent to the expression x = x - y;
Parameters


Syntax
x -= y; // equivalent to the expression x = x - y;
Parameters
x: variable. Allowed data types: int, float, double, byte, short, long.
y: variable or constant. Allowed data types: int, float, double, byte, short, long.
Example Code
x = 20;
x -= 2; // x now contains 18
See also
LANGUAGE Normal Subtraction


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Compound operators
            > Compoundbitwisexor

^=
          [Compound Operators]

Description
The compound bitwise XOR operator ^= is often used with a variable and a constant to toggle (invert) particular bits in a variable.
A review of the Bitwise XOR ^ operator:
0  0  1  1    operand1


0  0  1  1    operand1
0  1  0  1    operand2
----------
0  1  1  0    (operand1 ^ operand2) - returned result
Syntax
x ^= y; // equivalent to x = x ^ y;
Parameters
x: variable. Allowed data types: char, int, long.
y: variable or constant. Allowed data types: char, int, long.
Example Code
Bits that are "bitwise XORed" with 0 are left unchanged. So if myByte is a byte variable,
myByte ^ 0b00000000 = myByte;
Bits that are "bitwise XORed" with 1 are toggled so:
myByte ^ 0b11111111 = ~myByte;
Notes and Warnings


myByte ^ 0b11111111 = ~myByte;
Notes and Warnings
Because we are dealing with bits in a bitwise operator - it is convenient to use the binary formatter with constants. The numbers are still the same value in other representations, they are just not as easy to understand. Also, 0b00000000 is shown for clarity, but zero in any number format is zero.
Consequently - to toggle bits 0 & 1 of a variable, while leaving the rest of the variable unchanged, use the compound bitwise XOR operator (^=) with the constant 0b00000011
1  0  1  0  1  0  1  0    variable
0  0  0  0  0  0  1  1    mask
----------------------


----------------------
1  0  1  0  1  0  0  1
bits unchanged
                 bits toggled
Here is the same representation with the variables bits replaced with the symbol x. ~x represents the complement of x.
x  x  x  x  x  x  x  x    variable
0  0  0  0  0  0  1  1    mask
----------------------
x  x  x  x  x  x ~x ~x
bits unchanged
                 bits set
So if:
myByte = 0b10101010;
myByte ^= 0b00000011 == 0b10101001;
See also
LANGUAGE ^ Bitwise XOR


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Compound operators
            > Decrement

--
          [Compound Operators]

Description
Decrements the value of a variable by 1.
Syntax
x--;  // decrement x by one and returns the old value of x
--x;  // decrement x by one and returns the new value of x
Parameters


--x;  // decrement x by one and returns the new value of x
Parameters
x: variable. Allowed data types: int, long (possibly unsigned).
Returns
The original or newly decremented value of the variable.
Example Code
x = 2;
y = --x;  // x now contains 1, y contains 1
y = x--;  // x contains 0, but y still contains 1
See also


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Compound operators
            > Compoundaddition

+=
          [Compound Operators]

Description
This is a convenient shorthand to perform addition on a variable with another constant or variable.
Syntax
x += y; // equivalent to the expression x = x + y;
Parameters


Syntax
x += y; // equivalent to the expression x = x + y;
Parameters
x: variable. Allowed data types: int, float, double, byte, short, long.
y: variable or constant. Allowed data types: int, float, double, byte, short, long.
Example Code
x = 2;
x += 4; // x now contains 6
See also
LANGUAGE Normal Addition


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Arithmetic operators
            > Addition

+
          [Arithmetic Operators]

Description
Addition is one of the four primary arithmetic operations. The operator + (plus) operates on two operands to produce the sum.
Syntax
sum = operand1 + operand2;
Parameters


Syntax
sum = operand1 + operand2;
Parameters
sum: variable. Allowed data types: int, float, double, byte, short, long.
operand1: variable or constant. Allowed data types: int, float, double, byte, short, long.
operand2: variable or constant. Allowed data types: int, float, double, byte, short, long.
Example Code
int a = 5;
int b = 10;
int c = 0;
c = a + b;  // the variable 'c' gets a value of 15 after this statement is executed
Notes and Warnings
The addition operation can overflow if the result is larger than that which can be stored in the data type (e.g. adding 1 to an integer with the value 32,767 gives -32,768).


If one of the numbers (operands) are of the type float or of type double, floating point math will be used for the calculation.
If the operands are of float / double data type and the variable that stores the sum is an integer, then only the integral part is stored and the fractional part of the number is lost.
float a = 5.5;
float b = 6.6;
int c = 0;
c = a + b;  // the variable 'c' stores a value of 12 only as opposed to the expected sum of 12.1
See also


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Arithmetic operators
            > Assignment

=
          [Arithmetic Operators]

Description


> Assignment

=
          [Arithmetic Operators]

Description
The single equal sign = in the C++ programming language is called the assignment operator. It has a different meaning than in algebra class where it indicated an equation or equality. The assignment operator tells the microcontroller to evaluate whatever value or expression is on the right side of the equal sign, and store it in the variable to the left of the equal sign.
Example Code
int sensVal;              // declare an integer variable named sensVal
sensVal = analogRead(0);  // store the (digitized) input voltage at analog pin 0 in SensVal
Notes and Warnings
The variable on the left side of the assignment operator ( = sign ) needs to be able to hold the value stored in it. If it is not large enough to hold a value, the value stored in the variable will be incorrect.


Don’t confuse the assignment operator [ = ] (single equal sign) with the comparison operator [ == ] (double equal signs), which evaluates whether two expressions are equal.
See also
LANGUAGE if (conditional operators)
LANGUAGE char
LANGUAGE int
LANGUAGE long


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Arithmetic operators
            > Division

/
          [Arithmetic Operators]

Description
Division is one of the four primary arithmetic operations. The operator / (slash) operates on two operands to produce the result.
Syntax
result = numerator / denominator;
Parameters


Syntax
result = numerator / denominator;
Parameters
result: variable. Allowed data types: int, float, double, byte, short, long.
numerator: variable or constant. Allowed data types: int, float, double, byte, short, long.
denominator: non zero variable or constant. Allowed data types: int, float, double, byte, short, long.
Example Code
int a = 50;
int b = 10;
int c = 0;
c = a / b;  // the variable 'c' gets a value of 5 after this statement is executed
Notes and Warnings
If one of the numbers (operands) are of the type float or of type double, floating point math will be used for the calculation.


If the operands are of float / double data type and the variable that stores the result is an integer, then only the integral part is stored and the fractional part of the number is lost.
float a = 55.5;
float b = 6.6;
int c = 0;
c = a / b;  // the variable 'c' stores a value of 8 only as opposed to the expected result of 8.409
See also


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Arithmetic operators
            > Multiplication

*
          [Arithmetic Operators]

Description
Multiplication is one of the four primary arithmetic operations. The operator * (asterisk) operates on two operands to produce the product.
Syntax
product = operand1 * operand2;
Parameters


Syntax
product = operand1 * operand2;
Parameters
product: variable. Allowed data types: int, float, double, byte, short, long.
operand1: variable or constant. Allowed data types: int, float, double, byte, short, long.
operand2: variable or constant. Allowed data types: int, float, double, byte, short, long.
Example Code
int a = 5;
int b = 10;
int c = 0;
c = a * b;  // the variable 'c' gets a value of 50 after this statement is executed
Notes and Warnings
The multiplication operation can overflow if the result is bigger than that which can be stored in the data type.
If one of the numbers (operands) are of the type float or of type double, floating point math will be used for the calculation.


If the operands are of float / double data type and the variable that stores the product is an integer, then only the integral part is stored and the fractional part of the number is lost.
float a = 5.5;
float b = 6.6;
int c = 0;
c = a * b;  // the variable 'c' stores a value of 36 only as opposed to the expected product of 36.3
See also


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Arithmetic operators
            > Remainder

%
          [Arithmetic Operators]

Description
Remainder operation calculates the remainder when one integer is divided by another. It is useful for keeping a variable within a particular range (e.g. the size of an array). The % (percent) symbol is used to carry out remainder operation.
Syntax


Syntax
remainder = dividend % divisor;
Parameters
remainder: variable. Allowed data types: int, float, double.
dividend: variable or constant. Allowed data types: int.
divisor: non zero variable or constant. Allowed data types: int.
Example Code
int x = 0;
x = 7 % 5;  // x now contains 2
x = 9 % 5;  // x now contains 4
x = 5 % 5;  // x now contains 0
x = 4 % 5;  // x now contains 4
x = -4 % 5; // x now contains -4
x = 4 % -5; // x now contains 4
/* update one value in an array each time through a loop */
int values[10];
int i = 0;
void setup() {}
void loop() {


int i = 0;
void setup() {}
void loop() {
  values[i] = analogRead(0);
  i = (i + 1) % 10; // remainder operator rolls over variable
}
Notes and Warnings
The remainder operator does not work on floats.
If the first operand is negative, the result is negative (or zero).
Therefore, the result of x % 10 will not always be between 0 and 9 if x can be negative.
See also


Language
functions
variables
structure
Libraries
IoT Cloud API
Glossary
        The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

    Find anything that can be improved? Suggest corrections and new documentation via GitHub.
    Doubts on how to use Github? Learn everything you need to know in this tutorial.

Last Revision: Searching...
Last Build: 2023/06/30
Edit This Page
Reference
            >  Language
            >  Structure
            >  Arithmetic operators
            > Subtraction

-
          [Arithmetic Operators]

Description
Subtraction is one of the four primary arithmetic operations. The operator - (minus) operates on two operands to produce the difference of the second from the first.
Syntax
difference = operand1 - operand2;
Parameters