diff --git a/platformio.ini b/platformio.ini index e977df1..da5e8cd 100644 --- a/platformio.ini +++ b/platformio.ini @@ -14,6 +14,4 @@ board = wt32-eth01 framework = arduino lib_deps = siwats/ESPMegaPROR3@^2.3.7 monitor_speed = 115200 -build_flags = -DCORE_DEBUG_LEVEL=0 -upload_port = COM32 -monitor_port = COM32 \ No newline at end of file +build_flags = -DCORE_DEBUG_LEVEL=5 \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 6a502f5..07637b7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -121,6 +121,7 @@ void setup() espmega.enableWebServer(80); espmega.inputs.registerCallback(on_pin_change); espmega.outputs.setAutoSaveToFRAM(true); + analogCard.begin(); // Set value of pin 0-12 to 4095 for (uint8_t i = 0; i < 13; i++) { @@ -128,17 +129,20 @@ void setup() } espmega.outputs.setState(12, true); espmega.outputs.setValue(12,4095); + ESP_LOGD("ISE OS", "Setting up climate cards"); espmega.installCard(2, &climateCard); climateCard.bindFRAM(&espmega.fram, 5000); climateCard.loadStateFromFRAM(); climateCard.setFRAMAutoSave(true); espmega.display->bindClimateCard(&climateCard); + ESP_LOGD("ISE OS", "Installing current transformer cards"); espmega.installCard(4, &ct_light_phase1); espmega.installCard(5, &ct_light_phase2); espmega.installCard(6, &ct_socket); espmega.installCard(7, &ct_ac_phase1); espmega.installCard(8, &ct_ac_phase2); espmega.installCard(9, &ct_ac_phase3); + ESP_LOGD("ISE OS", "Registering Current Transformer Cards with IoT Module"); espmega.iot->registerCard(4); espmega.iot->registerCard(5); espmega.iot->registerCard(6);