diff --git a/BSB_LAN/BSB_LAN_custom.h b/BSB_LAN/BSB_LAN_custom.h index 7f9074f9..12b29083 100644 --- a/BSB_LAN/BSB_LAN_custom.h +++ b/BSB_LAN/BSB_LAN_custom.h @@ -1,76 +1,11 @@ /* - * Example code for BSB_lan_custom.h * If configuration definement CUSTOM_COMMANDS is active, this code is run * at the end of each main loop and utilizes the main loop variables * custom_timer (set each loop to millis()) and custom_timer_compare. - * This code example checks for absolute humidity of an inside as well as - * outside DHT22 temperature/humidity sensor and activates a fan on GPIO 6 - * if absolute outside humidity is 5% less than inside. - * - * Afterwards, calculate the average of all MAX! wall and heating thermostats - * and send this as the current room temperature to the heating system. + * This short example prints a "Ping!" message every 20 seconds. */ if (custom_timer > custom_timer_compare+20000) { // every 20 seconds custom_timer_compare = millis(); - int numDHTSensors = sizeof(DHT_Pins) / sizeof(int); - double hum[2]={ 0 }; - double temp[2]={ 0 }; - for(int i=0;i15) { - digitalWrite(6, 1); - Serial.println("Fan on"); - } - if (abs_hum_outside >= abs_hum_inside || temp[0]<14.5) { - digitalWrite(6, 0); - Serial.println("Fan off"); - } - } -#ifdef MAX_CUL - - max_cul.println(F("Zr")); // periodically (re-)activate "Moritz" mode on Cube to receive MAX messages - int max_avg_count = 0; - float max_avg = 0; - for (int x=0;x<20;x++) { - if (max_cur_temp[x] > 0) { - max_avg += (float)max_cur_temp[x] / 10; - max_avg_count++; - Serial.print(max_devices[x], HEX); - Serial.print(F(": ")); - Serial.print((float)max_cur_temp[x] / 10); // Current temperature - Serial.print(F(" / ")); - Serial.print((float)max_dst_temp[x] / 2); // Desired temperature - Serial.print(F(" / ")); - Serial.println(max_valve[x]); // Valve opening in percent - } - } - if (max_avg_count > 0) { - Serial.print(F("AvgMax: ")); - Serial.println(max_avg / max_avg_count); - - char set_temp[6]; - dtostrf((max_avg/max_avg_count), 1, 1, set_temp); // Send average temperature -// Serial.print(F("Setting room temperature to ")); -// Serial.println(set_temp); -// set(10000, set_temp, 0); - } -#endif + Serial.println("Ping!"); }