### Basic Configuration and Usage Source: https://github.com/ihormelnyk/opentherm_library/blob/master/README.md This snippet shows how to include the OpenTherm library, define controller pins, instantiate the OpenTherm class, set up the interrupt handler, and initialize the OpenTherm instance in the setup function. It also demonstrates basic requests in the loop function, such as setting boiler status, setting and getting boiler temperature. ```c++ #include You have to choose 2 controller GPIO pins which will be used for communication and connected to [OpenTherm Adapter](http://ihormelnyk.com/opentherm_adapter). Controller(Arduino/ESP8266) input pin should support interrupts. Controller output pin should be connected to OpenTherm Adapter input pin and vise versa. ``` ```c++ const int inPin = 2; const int outPin = 3; ``` ```c++ OpenTherm ot(inPin, outPin); ``` ```c++ void handleInterrupt() { ot.handleInterrupt(); } ``` ```c++ void setup() { ot.begin(handleInterrupt); } ``` ```c++ void loop() { //Set/Get Boiler Status ot.setBoilerStatus(enableCentralHeating, enableHotWater, enableCooling); //Set Boiler Temperature to 64 degrees C ot.setBoilerTemperature(64); //Get Boiler Temperature float temperature = ot.getBoilerTemperature(); delay(1000); } ``` -------------------------------- ### CMakeLists.txt Configuration Source: https://github.com/ihormelnyk/opentherm_library/blob/master/CMakeLists.txt Configuration for the OpenTherm ESP-IDF component. ```cmake cmake_minimum_required(VERSION 3.5) idf_component_register( SRCS "src/OpenTherm.cpp" INCLUDE_DIRS "." "src" PRIV_REQUIRES arduino ) project (OpenTherm) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.