The Integration Layer

The Integration Layer aims to connect the Embever IoT library with an external set of functions or with a library which can provide the necessary functions to drive the I2C bus and handle the GPIO interface. In this way, the Embever IoT library is capable of use any underlying implementation to issue commands on the I2C bus and read digital states of a GPIO pin.

To achieve this functionality, the designed functions shall be provided to the Embever IoT library trough an internal type. This methodology is widely used to set up interfaces in C language. There are already supported platforms in the Integration Layer, which can be used off-the-shelf.

The supported frameworks are:

  • Arduino

Using the supported platforms is straightforward. There are macro definitions for setting up the necessary functions and passing them to the Integration Layer.

The example below shows how to set it up for the Arduino Wire Library.

#include <Arduino.h>
#include <Wire.h>
#include "ebv_iot.h"

// Define interface functions

void setup() {
    // Passing the interface to the Integration layer

void loop(){


To get more information about how to set up and use the Integration Layer please refer the Integration Guide topic.