$LIBIOTA_ROOT_DIR refers to the root directory where libiota code is installed. Refer to the toplevel README for overall code layout.
This directory contains Linux platform specific code.
This directory contains a simple iota light example.
Before building, API keys must be created, and your environment should be set up as outlined in the document.
This sample acts as a simple light device with support for on/off, brightness, colorXY and color temperature traits.
cd "$LIBIOTA_ROOT_DIR/" make clean && make -C examples/host/light -j8
The executable will be created as
$LIBIOTA_ROOT_DIR/out/host/examples/light/light. You can refer to the GETTING_STARTED docs to understand how this binary is used.
To build for production mode, use the
NDEBUG compile flag as follows to turn off logs and asserts in libiota and example code.
cd "$LIBIOTA_ROOT_DIR/" make clean && make -C examples/host/light EXTRA_COMMON_FLAGS="-DNDEBUG" -j8
Note that in this mode, you should not override the
-DIOTA_LOG_LEVEL explicitly on make command line arguments.
Please refer to PRODUCTION_GUIDELINES for other recommendations.
Please refer to SYSTEM_TIME for information on system time requirements.