Home Elements Boards Recipes

Examples for the HomeDing library

There are some example projects coming with the Homeding library that can be loaded into the IDE by using the Arduino examples menu.

Because the functionality of the target device is mostly defined by the configuration and not by the sketch itself you can find a lot of examples for configuration and recipes combining multiple elements to fulfill a specific need.

The standard example can be used as a good starting point.

Important Notice: Examples will not only require to upload the sketch. It is as also required to upload the files from the data folder to the filesystem. If you like to see a full start-to-end building a device look into one of the stories.

Examples

These examples that come with the library need the nodeMCU board and no specific external hardware:

Customizing the Standard Example

Under normal conditions the Standard Example offers a solution where all required elements are compiled and ready to be configured.

In some cases there will not be enough memory to upload or there is the need to add some specific elements for a specific solution. This can be done using the following mechanisms.

Include Elements to a firmware

When a sketch is compiled to a firmware a small, large or a special set of elements can be added. These are then available to be configured.

The HOMEDING_INCLUDE_xxx definitions control what elements will be registered in the Element Registry.

In the *.ino file of every example you can find a list of HOMEDING_INCLUDE_xxx definitions that can be commented out or activated to specify what elements are later available for configuration. By disabling the definitions you can remove individual elements when they are not required to save program space.

The Minimal Examples is derived from the standard example by just disabling elements this way.

Some elements that require a specific external library that are disables in the Standard Example can be included this way.

Implement local elements.

In the folder of the script you can add some elements that are not part of the library but will also be compiled together with the sketch and therefore are also available for configuration.

The Probe Example and the Radio Example show how to include a very specific elements into the sketch folder.

The DevDing Example is used to implement some additional elements for problem analysis. It is instrumented for using the (limited, software based) remote debugger. New elements can be implemented by using the provided empty MyElement implementation as a boilerplate.

See also