කෙහෙල් ඉදවන්ඩ කැරිම code එක 🤌🤌 Gemini Pro 2.5

IndrajithGamage

Well-known member
  • Oct 6, 2022
    13,770
    1
    15,516
    113
    රිජිෆෝම් පෙට්ටියකට bulb එකක් දැම්මා. එ‍්ක on off වෙවී කැමති temperature එකක දිගටම තියෙන්න ගැජට් එකක් හැදුවා. 🤌

    ප්‍රධාන හේතුව කෙසෙල් ඉදවීම. නුවරඑළියෙ කෙහෙල් ඉදෙන්ඩ කල් යනවනෙ. මේකට දාල තිබ්බාම කොළඹ තියෙනවා වගේ තමයි. අවශ්‍ය Temperature එක phone එකෙන්ම set කරන්න පුළුවන්.

    Gemini 2.5 pro තමයි දෙයියා. 😍 ChatGPT ට දුන්නම පයියක් කොරා. තව ඩිංගෙන් ගේත් එක්ක ගිනි ගන්නවා. 😁😁

    පාවිච්චි කරේ,

    1. ESP8266 Wemos D1 mini - Rs. 690 යි.
    2. DHT22 Module - Rs. 340 යි.
    3. ESP Relay Module - Rs. 390 යි.
    4. වයර්, හෝල්ඩරයක්, DC දෙන්න phone charger එකක්, 40W සූත්‍රිකා බල්බ් එකක් etc.

    Screenshot-2025-08-02-21-35-46-986-org-mozilla-firefox.jpg



    C++:
    #include <ESP8266WiFi.h>
    #include <DHT.h>
    
    // --- Your Settings ---
    const char* ssid = "Indrajith WiFi";
    const char* password = "12345qwert";
    
    // --- Hardware Pins ---
    #define DHT_DATA_PIN   5   // GPIO5 (D1) for DHT22 Data
    #define DHT_POWER_PIN  13  // GPIO13 (D7) to power the DHT22
    #define RELAY_PIN      14  // GPIO14 (D5) for the relay
    
    #define DHTTYPE DHT22
    
    // --- Controller Settings ---
    float targetTemp = 36.0;
    float hysteresis = 0.5;
    
    // --- SAFETY FEATURES ---
    const unsigned long MAX_FROZEN_DURATION = 30000; // 30 seconds for frozen value check
    const unsigned long MAX_HEATER_ON_TIME = 90000;  // 90 seconds max heater on time
    
    // --- Global Variables ---
    DHT dht(DHT_DATA_PIN, DHTTYPE);
    WiFiServer server(80);
    
    float temperature = NAN;
    float humidity = NAN;
    bool relayState = true;  // true = OFF, false = ON
    
    String mode = "auto";    // "auto", "deadeye", "on", "off", "FAILSAFE"
    String failsafeReason = "";
    
    // Timers and state variables
    unsigned long lastReadTime = 0;
    unsigned long heaterOnTimestamp = 0;
    
    // Variables for frozen sensor detection
    unsigned long lastValueChangeTime = 0;
    float lastStableTemp = NAN;
    float lastStableHumidity = NAN;
    
    // Variables for deadeye mode
    unsigned long deadeyeTimerStart = 0;
    bool deadeyeIsOn = false;
    
    // --- Function Prototypes ---
    void resetDHT();
    
    void setup() {
      pinMode(RELAY_PIN, OUTPUT);
      digitalWrite(RELAY_PIN, HIGH); // Start with relay OFF
      relayState = true;
    
      pinMode(DHT_POWER_PIN, OUTPUT);
      digitalWrite(DHT_POWER_PIN, HIGH); // Power ON the DHT sensor
    
      Serial.begin(115200);
      delay(100);
    
      dht.begin();
      delay(2000); // Wait for DHT to stabilize after power on
    
      // Initialize timers
      lastValueChangeTime = millis();
    
      WiFi.begin(ssid, password);
      while (WiFi.status() != WL_CONNECTED) {
        delay(500);
        Serial.print(".");
      }
      Serial.println("\nWiFi connected.");
      server.begin();
    }
    
    void loop() {
      // =================================================================
      // STEP 1: SUPREME SAFETY CHECKS
      // =================================================================
      // This runs regardless of mode, except when already in FAILSAFE
      if (mode != "FAILSAFE") {
        // Failsafe 1: Heater has been on continuously for too long.
        if (!relayState && (millis() - heaterOnTimestamp > MAX_HEATER_ON_TIME)) {
          mode = "FAILSAFE";
          failsafeReason = "Max heater-on time exceeded (" + String(MAX_HEATER_ON_TIME / 1000) + "s).";
        }
      }
    
      // =================================================================
      // STEP 2: SENSOR READING & RECOVERY
      // =================================================================
      if (millis() - lastReadTime > 2000) {
        lastReadTime = millis();
        bool readingSuccess = false;
    
        // --- First read attempt ---
        float t = dht.readTemperature();
        float h = dht.readHumidity();
    
        if (isnan(t) || isnan(h)) {
          Serial.println("Sensor read failed. Resetting sensor...");
          resetDHT();
          // --- Second read attempt after reset ---
          t = dht.readTemperature();
          h = dht.readHumidity();
    
          if (isnan(t) || isnan(h)) {
            Serial.println("Sensor still not responding after reset. Entering Deadeye mode.");
            if (mode == "auto") {
               mode = "deadeye";
               deadeyeTimerStart = millis(); // Start the deadeye cycle timer
               deadeyeIsOn = false; // Start in the OFF part of the cycle
            }
          } else {
            readingSuccess = true; // Success after reset
          }
        } else {
          readingSuccess = true; // Success on first try
        }
    
        if (readingSuccess) {
          if (mode == "deadeye") {
            Serial.println("Sensor recovered. Switching back to auto mode.");
            mode = "auto"; // If sensor recovers, go back to auto
          }
          temperature = t;
          humidity = h;
    
          // --- Frozen value check ---
          if (abs(t - lastStableTemp) > 0.01 || abs(h - lastStableHumidity) > 0.01) {
            lastStableTemp = t;
            lastStableHumidity = h;
            lastValueChangeTime = millis();
          } else {
            if (millis() - lastValueChangeTime > MAX_FROZEN_DURATION) {
              Serial.println("Sensor values are frozen. Resetting...");
              resetDHT();
              lastValueChangeTime = millis(); // Reset timer after reset attempt
            }
          }
        }
      }
     
    Last edited:

    IndrajithGamage

    Well-known member
  • Oct 6, 2022
    13,770
    1
    15,516
    113
    C++:
    // =================================================================
      // STEP 3: CONTROL LOGIC
      // =================================================================
      if (mode == "FAILSAFE") {
        digitalWrite(RELAY_PIN, HIGH); // Force heater OFF
        relayState = true;
        heaterOnTimestamp = 0;
      } else if (mode == "on") {
        digitalWrite(RELAY_PIN, LOW);
        if (relayState) heaterOnTimestamp = millis(); // If it was OFF, start timer
        relayState = false;
      } else if (mode == "off") {
        digitalWrite(RELAY_PIN, HIGH);
        relayState = true;
        heaterOnTimestamp = 0;
      } else if (mode == "auto") {
        // Standard thermostat logic
        if (!isnan(temperature)) {
          if (temperature < (targetTemp - hysteresis) && relayState) {
            digitalWrite(RELAY_PIN, LOW); // Turn ON
            relayState = false;
            heaterOnTimestamp = millis();
          } else if (temperature >= targetTemp && !relayState) {
            digitalWrite(RELAY_PIN, HIGH); // Turn OFF
            relayState = true;
            heaterOnTimestamp = 0;
          }
        }
      } else if (mode == "deadeye") {
        // Timed fallback logic
        float t_on = (targetTemp * 1.5) - 10;
        if (t_on < 0) t_on = 0;
        unsigned long on_duration = (unsigned long)t_on * 1000;
        
        float t_off = (targetTemp * 3.0) + 90;
        if (t_off < 0) t_off = 0;
        unsigned long off_duration = (unsigned long)t_off * 1000;
    
        if (deadeyeIsOn) { // If currently in ON cycle
          if (millis() - deadeyeTimerStart > on_duration) {
            digitalWrite(RELAY_PIN, HIGH); // Switch to OFF
            relayState = true;
            heaterOnTimestamp = 0;
            deadeyeIsOn = false;
            deadeyeTimerStart = millis();
          }
        } else { // If currently in OFF cycle
          if (millis() - deadeyeTimerStart > off_duration) {
            digitalWrite(RELAY_PIN, LOW); // Switch to ON
            relayState = false;
            heaterOnTimestamp = millis();
            deadeyeIsOn = true;
            deadeyeTimerStart = millis();
          }
        }
      }
      
      // =================================================================
      // STEP 4: HANDLE WEB REQUESTS
      // =================================================================
      WiFiClient client = server.available();
      if (client) {
        String request_line = "";
        boolean first_line = true;
        String current_line = "";
        while (client.connected()) {
          if (client.available()) {
            char c = client.read();
            if (c == '\n') {
              if (first_line) { request_line = current_line; first_line = false; }
              if (current_line.length() == 0) {
                
                // --- Parse Request ---
                if (request_line.indexOf("GET /?mode=") != -1) {
                  // Clicking a mode button resets any error state
                  mode = "auto";
                  if(request_line.indexOf("=on") != -1) mode = "on";
                  else if(request_line.indexOf("=off") != -1) mode = "off";
                  failsafeReason = "";
                  lastValueChangeTime = millis();
                  lastStableTemp = NAN; // Force re-evaluation
                } else if (request_line.indexOf("GET /?target=") != -1) {
                  int start = request_line.indexOf('=') + 1;
                  int end = request_line.indexOf(' ', start);
                  String tempStr = request_line.substring(start, end);
                  float newTarget = tempStr.toFloat();
                  if (newTarget >= 5 && newTarget < 100) targetTemp = newTarget;
                }
                
                // --- SEND WEB PAGE ---
                client.println("HTTP/1.1 200 OK");
                client.println("Content-type:text/html");
                client.println("Connection: close");
                client.println();
    
                client.println("<!DOCTYPE html><html><head><title>Thermostat</title>");
                client.println("<meta name='viewport' content='width=device-width, initial-scale=1.0'>");
                client.println("<meta http-equiv='refresh' content='5'>");
                client.println("<style>");
                client.println("body{font-family:sans-serif; background-color:#2c3e50; color:#ecf0f1; text-align:center;}");
                client.println("h1,h2,h3{margin:10px 0;} .card{background-color:#34495e; padding:20px; margin:20px auto; border-radius:10px; max-width:400px;}");
                client.println("input[type=submit]{padding:10px 20px; border:none; border-radius:5px; margin:5px; cursor:pointer;}");
                client.println("input[type=number]{padding:10px; border-radius:5px; border:none;}");
                client.println(".auto{background-color:#3498db;} .on{background-color:#2ecc71;} .off{background-color:#e67e22;}");
                client.println(".status{padding:15px; border-radius:8px; font-weight:bold; font-size:1.2em;}");
                client.println(".sensor{background-color:#27ae60;} .deadeye{background-color:#f39c12;} .failsafe{background-color:#c0392b;}");
                client.println(".info{font-size:0.8em; color:#bdc3c7;}");
                client.println("</style></head><body><div class='card'>");
    
                if(mode == "FAILSAFE"){
                  client.println("<div class='status failsafe'>MODE: FAILSAFE</div>");
                  client.println("<h2>System Halted</h2>");
                  client.println("<p class='info'><b>Reason:</b> " + failsafeReason + "</p>");
                } else if (mode == "deadeye") {
                  client.println("<div class='status deadeye'>MODE: DEΔDEYE</div>");
                  client.println("<p class='info'>Sensor unresponsive. Running on timed cycle.</p>");
                } else {
                  client.println("<div class='status sensor'>MODE: SENSOR</div>");
                }
                
                client.println("<h2>" + (isnan(temperature) ? "--.-" : String(temperature, 1)) + " &deg;C | " + (isnan(humidity) ? "--.-" : String(humidity, 1)) + " %</h2>");
                client.println("<hr style='border-color:#2c3e50;'>");
                client.println("<h3>Target: " + String(targetTemp, 1) + " &deg;C | Relay: " + (relayState ? "OFF" : "ON") + "</h3>");
                
                client.println("<h3>Set Mode</h3><form method='GET'>");
                client.println("<input type='submit' name='mode' value='auto' class='auto'>");
                client.println("<input type='submit' name='mode' value='on' class='on'>");
                client.println("<input type='submit' name='mode' value='off' class='off'></form>");
    
                client.println("<h3>Set New Target (min 5&deg;C)</h3><form method='GET'>");
                client.println("<input type='number' name='target' step='0.1' value='" + String(targetTemp,1) + "' required>");
                client.println("<input type='submit' value='Set'></form>");
    
                client.println("<hr style='border-color:#2c3e50;'>");
                client.println("<p class='info'>Heater On Timer: " + (!relayState ? String((millis()-heaterOnTimestamp)/1000) : "0") + "/" + String(MAX_HEATER_ON_TIME/1000) + "s<br>");
                client.println("Last Value Change: " + String((millis() - lastValueChangeTime)/1000) + "s ago</p>");
                
                client.println("</div></body></html>");
                break;
              }
              current_line = "";
            } else if (c != '\r') {
              current_line += c;
            }
          }
        }
        client.stop();
      }
    }
    
    /**
     * @brief Power cycles the DHT22 sensor to reset it.
     */
    void resetDHT() {
      Serial.println("Power cycling DHT sensor...");
      digitalWrite(DHT_POWER_PIN, LOW);   // Power OFF
      delay(1000);                        // Wait 1 second
      digitalWrite(DHT_POWER_PIN, HIGH);  // Power ON
      delay(2000);                        // Wait 2 seconds for sensor to stabilize
      dht.begin();                        // Re-initialize the sensor
    }
     
    • Like
    Reactions: Yeezus

    Yeezus

    Well-known member
  • Nov 20, 2024
    4,775
    1
    6,642
    113
    🍌 අපි නම් ඉස්සර කරේ
    වත්තේ කපනවා වලක්
    ඒකට දානවා කෙසෙල් කැන් 2ක් විතර,

    ඊටපස්සේ වල වහනවා උළු කැට දෙකක් දාලා පොඩි සිදුරක් වගේ හදලා ... ඊටපස්සේ ඒ සිදුරෙන් දුන් ගහනවා ... වේළුණු කෙසෙල් කොළ වගේ දාලා ...

    ඊටපස්සේ වහල තියනවා ටික දවසක්, සතියක් වගේ

    ගොඩ ගද් දී කහ පාටට ඉඳිල තියනවා නිකන් කාබයිට් ගහලා වගේ, අවුරුදු වගේ ලං වෙද්දි අනිවාරෙන් ඉස්සර කෙසෙල් කැන් තුනක් හතරක් ඔය විදියට වල දාලා ඉදවනව 🍌
     

    VimangaLK

    Well-known member
  • Sep 26, 2024
    3,130
    2,140
    113
    Too many bugs pedo pons

    Critical Bugs:​

    1. Deadeye mode bypasses safety checks: In the first file, the failsafe check only runs when mode != "FAILSAFE", but deadeye mode can turn the heater on without being subject to the MAX_HEATER_ON_TIME safety limit. The deadeye mode in the second file can keep the heater on for extended periods without safety monitoring.
    2. Float comparison with abs() instead of fabs():


      cpp
      if (abs(t - lastStableTemp) > 0.01 || abs(h - lastStableHumidity) > 0.01)
      Should be fabs() for floating-point numbers.
    3. Deadeye timing calculation issues:


      cpp
      float t_on = (targetTemp * 1.5) - 10;
      float t_off = (targetTemp * 3.0) + 90;
      For targetTemp = 36°C: t_on = 44 seconds, t_off = 198 seconds. The 44-second on-time is dangerously close to the 90-second safety limit, and there's no bounds checking.
    4. Race condition in web request handling: The mode switching logic resets to "auto" first, then conditionally changes:


      cpp
      mode = "auto";
      if(request_line.indexOf("=on") != -1) mode = "on";
      else if(request_line.indexOf("=off") != -1) mode = "off";
    5. Heater timer not reset properly in deadeye mode: When deadeye mode switches from ON to OFF, it sets heaterOnTimestamp = 0, but when switching from OFF to ON, it sets heaterOnTimestamp = millis(). This could cause timing inconsistencies.

    Logic Issues:​

    1. Inconsistent failsafe recovery: Manual mode buttons clear the failsafe state, but there's no check if the underlying problem (like max heater time) still exists.
    2. Sensor recovery detection: When switching back from deadeye to auto mode, there's no verification that the sensor readings are actually stable/valid.
    3. DHT reset timing: The frozen value check resets lastValueChangeTime after attempting a reset, but doesn't account for whether the reset was successful.

    Potential Safety Issues:​

    1. No bounds checking on deadeye calculations: Negative values are clamped to 0, but there's no upper limit checking.
    2. Heater safety bypass: The safety check for maximum heater on-time doesn't apply to deadeye mode, which could theoretically run the heater indefinitely if the calculated on-time exceeds the safety limit.
    The most critical fix needed is ensuring the heater safety timer applies to ALL modes, especially deadeye mode.
     

    IndrajithGamage

    Well-known member
  • Oct 6, 2022
    13,770
    1
    15,516
    113
    🍌 අපි නම් ඉස්සර කරේ
    වත්තේ කපනවා වලක්
    ඒකට දානවා කෙසෙල් කැන් 2ක් විතර,

    ඊටපස්සේ වල වහනවා උළු කැට දෙකක් දාලා පොඩි සිදුරක් වගේ හදලා ... ඊටපස්සේ ඒ සිදුරෙන් දුන් ගහනවා ... වේළුණු කෙසෙල් කොළ වගේ දාලා ...

    ඊටපස්සේ වහල තියනවා ටික දවසක්, සතියක් වගේ

    ගොඩ ගද් දී කහ පාටට ඉඳිල තියනවා නිකන් කාබයිට් ගහලා වගේ, අවුරුදු වගේ ලං වෙද්දි අනිවාරෙන් ඉස්සර කෙසෙල් කැන් තුනක් හතරක් ඔය විදියට වල දාලා ඉදවනව 🍌
    නුවරඑළියෙ වැස්සෙ, සීතලේ ඕක සාර්ථක නැහැනෙ බං. කොටින්ම dryers නැත්තම් රෙදිවත් වේලන්න බැහැනෙ. ඕක හරි උ‍ෟෂ්ණ පළාත්වලට නම්. අප්‍රේල්වලට විතරක් නැතිව අනිත් කාලවල නුවරඑළියෙ අ‍ැවිත් මාස කීපයක් ඉඳල බලහන්කො අ‍ාතල් එක. 😅

    මේකෙ 36°C වල දිගටම තියෙන නිසා කොළඹ, කුරුණෑගල පැත්තක තිබ්බා වගේම දවස් දෙක තුනෙන් ඉදෙනවා. 😍

    Too many bugs pedo pons

    Critical Bugs:​

    1. Deadeye mode bypasses safety checks: In the first file, the failsafe check only runs when mode != "FAILSAFE", but deadeye mode can turn the heater on without being subject to the MAX_HEATER_ON_TIME safety limit. The deadeye mode in the second file can keep the heater on for extended periods without safety monitoring.
    2. Float comparison with abs() instead of fabs():


      cpp
      if (abs(t - lastStableTemp) > 0.01 || abs(h - lastStableHumidity) > 0.01)
      Should be fabs() for floating-point numbers.
    3. Deadeye timing calculation issues:


      cpp
      float t_on = (targetTemp * 1.5) - 10;
      float t_off = (targetTemp * 3.0) + 90;
      For targetTemp = 36°C: t_on = 44 seconds, t_off = 198 seconds. The 44-second on-time is dangerously close to the 90-second safety limit, and there's no bounds checking.
    4. Race condition in web request handling: The mode switching logic resets to "auto" first, then conditionally changes:


      cpp
      mode = "auto";
      if(request_line.indexOf("=on") != -1) mode = "on";
      else if(request_line.indexOf("=off") != -1) mode = "off";
    5. Heater timer not reset properly in deadeye mode: When deadeye mode switches from ON to OFF, it sets heaterOnTimestamp = 0, but when switching from OFF to ON, it sets heaterOnTimestamp = millis(). This could cause timing inconsistencies.

    Logic Issues:​

    1. Inconsistent failsafe recovery: Manual mode buttons clear the failsafe state, but there's no check if the underlying problem (like max heater time) still exists.
    2. Sensor recovery detection: When switching back from deadeye to auto mode, there's no verification that the sensor readings are actually stable/valid.
    3. DHT reset timing: The frozen value check resets lastValueChangeTime after attempting a reset, but doesn't account for whether the reset was successful.

    Potential Safety Issues:​

    1. No bounds checking on deadeye calculations: Negative values are clamped to 0, but there's no upper limit checking.
    2. Heater safety bypass: The safety check for maximum heater on-time doesn't apply to deadeye mode, which could theoretically run the heater indefinitely if the calculated on-time exceeds the safety limit.
    The most critical fix needed is ensuring the heater safety timer applies to ALL modes, especially deadeye mode.

    AI දැම්මට කියවල තේරුම් ගන්න IQ මදි නේද පොන්නයො? Failsafe එක උවමනාවට වඩා critical කියල හිතලා.

    Critical bugs 😂😂

    1. අදාළම නෑ. එ‍්ක තියෙන්නෙ sensor fail වුණොත් යන්ඩ. තත්පර 90 පැන්නා කියල මහ ලොකු ප්‍රශ්නයක් නෑ කාලය ගිහින් off වෙනවා නම්.

    2. අදාළ නෑ. Functionally same.

    3. අදාළ නෑ, තත්පර 90 නෙවෙයි 900 ක් ගියත් කමක් නෑ off වෙනවා නම්. Formula එකට දාන temperatures අනුව එහෙම වෙන්න බැහැ.

    4. දෙකම එකයි, on එක තියෙන්නෙ අවශ්‍ය වෙලාවට පාවිච්චි කරන්න තමයි.

    5. Off එකෙන් On එකට යද්දි timer එක අදාල නෑ.

    Logical issues 😅😅

    1. හදලා තියෙන්නෙම එහෙම තමයි.

    2. නැත්තෙ පකද හුත්තො? DHT22 කොහොමත් Passive නෙ. ඉතින් තත්පර 30 ක් same value නම් fail කියල ගන්න එකයි කරන්නෙ.

    3. අ‍ායෙත් එකම පක. Value change වෙනවා නම් reset එක successful තමයි වේසෝ.

    Potential safety issues 🤣🤣🤣

    1. පාවිච්චි කරන්නෙ මොළේ තියෙන එකෙක්. Realistic temperature range වලට logic එක වැඩ. මොන මන්ද මානසික පොන්නයද room temperature එකටත් වඩා අඩු එ‍්වා දාන්නෙ?

    2. එම. මේකට දාන්නෙ realistic ගණන්. කෙහෙල් තම්බනවා නෙවෙයි ඉදවනවා විතරයි.

    දැන් ගිහින් චූටි පයිය හොලවල කැරි තේ හැඳි බාගයක් යවල බුදිය ගනින්. 🤭
    ------ Post added on Aug 3, 2025 at 10:18 PM
     
    Last edited:

    VimangaLK

    Well-known member
  • Sep 26, 2024
    3,130
    2,140
    113
    නුවරඑළියෙ වැස්සෙ, සීතලේ ඕක සාර්ථක නැහැනෙ බං. කොටින්ම dryers නැත්තම් රෙදිවත් වේලන්න බැහැනෙ. ඕක හරි උ‍ෟෂ්ණ පළාත්වලට නම්. අප්‍රේල්වලට විතරක් නැතිව අනිත් කාලවල නුවරඑළියෙ අ‍ැවිත් මාස කීපයක් ඉඳල බලහන්කො අ‍ාතල් එක. 😅

    මේකෙ 36°C වල දිගටම තියෙන නිසා කොළඹ, කුරුණෑගල පැත්තක තිබ්බා වගේම දවස් දෙක තුනෙන් ඉදෙනවා. 😍



    AI දැම්මට කියවල තේරුම් ගන්න IQ මදි නේද පොන්නයො? Failsafe එක උවමනාවට වඩා critical කියල හිතලා.

    Critical bugs 😂😂

    1. අදාළම නෑ. එ‍්ක තියෙන්නෙ sensor fail වුණොත් යන්ඩ. තත්පර 90 පැන්නා කියල මහ ලොකු ප්‍රශ්නයක් නෑ කාලය ගිහින් off වෙනවා නම්.

    2. අදාළ නෑ. Functionally same.

    3. අදාළ නෑ, තත්පර 90 නෙවෙයි 900 ක් ගියත් කමක් නෑ off වෙනවා නම්. Formula එකට දාන temperatures අනුව එහෙම වෙන්න බැහැ.

    4. දෙකම එකයි, on එක තියෙන්නෙ අවශ්‍ය වෙලාවට පාවිච්චි කරන්න තමයි.

    5. Off එකෙන් On එකට යද්දි timer එක අදාල නෑ.

    Logical issues 😅😅

    1. හදලා තියෙන්නෙම එහෙම තමයි.

    2. නැත්තෙ පකද හුත්තො? DHT22 කොහොමත් Passive නෙ. ඉතින් තත්පර 30 ක් same value නම් fail කියල ගන්න එකයි කරන්නෙ.

    3. අ‍ායෙත් එකම පක. Value change වෙනවා නම් reset එක successful තමයි වේසෝ.

    Potential safety issues 🤣🤣🤣

    1. පාවිච්චි කරන්නෙ මොළේ තියෙන එකෙක්. Realist temperature range වලට logic එක වැඩ. මොන මන්ද මානසික පොන්නයද room temperature එකටත් වඩා අඩු එ‍්වා දාන්නෙ?

    2. එම. මේකට දාන්නෙ realistic ගණන්. කෙහෙල් තම්බනවා නෙවෙයි ඉදවනවා විතරයි.
    ------ Post added on Aug 3, 2025 at 10:18 PM
    කෙහෙල් ගෙඩිය පුකේ ගහන් නිදා ගනින් බන්
    උදේ වෙද්දි ඉදිලා තියෙයි
     
    • Haha
    Reactions: Clockwork

    IndrajithGamage

    Well-known member
  • Oct 6, 2022
    13,770
    1
    15,516
    113
    High IQ lune
    Lol

    My very sensorium is beset by a beatific transport of such inenarrable intensity, coalesced with a measure of stupefacient obnubilation so profound, as to defy all metrical constraint, engendered by the munificent and numinous exegesis heretofore articulated. The proferred hermeneutics possess a pulchritude so exquisitely diaphanous and a veneficial radiance so potent that my essential pneuma has been irrevocably thaumaturgically enthralled.

    The prestidigitatorial chirography governing the coterminous and subsequent disquisitions constitutes an exploit of such cyclopean proportions that it induces in me a state of both apneic awe and reverential paralysis. The subterranean significations and tropological latencies that permeate the exegetical and allegorical strata are of such consummate finesse and architectonic brilliance that they have transmuted mere graphemes into a sublime apotheosis of rhetorical pyrotechnics.

    It must be averred with supereminent gravity that the consequentiality of this corpus of information is such that any maneuver aimed at its morphological adulteration or structural misprision would precipitate eschatological sequelae of a truly epic scale, culminating in the subsumption of all into an aporia of nullifidian relativity. The cardinal vaticination, were it to be subjected to a syzygial concatenation, would potentiate its efficaciousness to a previously unexampled magnitude; ergo, it is of paramount exigency that it be regarded with the most scrupulous veneration and solicitous reverence.

    The unstinting encomium and sense of eudaemonia I experience, having been afforded the singular occasion to luxuriously ensconce myself within the lambent refulgence of this transcendent paideia, beggar all powers of linguistic formulation. It stands as an irrefragable monument to the preternatural intellectual armamentarium and creative fecundity of the progenitor responsible for its genesis. The sheer noetic temerity inherent in their methodological framework, presenting a conception of such bewildering anfractuosity to a societal matrix afflicted with pervasive noetic hebetude, is an act that verges on the sublime.

    Alas, it is with a sentiment approaching lugubriousness that I must confabulate, notwithstanding my own fugacious noetic acumen, the copiosity of my epistemic reservoir, a ludic pertinacity, and what might be termed a sort of fiduciary sagacity, that subsequent to a protracted and exhaustive period of ratiocinative excogitation, I have attained the inexorable and perdurable certitude that I am divested of any substantive additament to append to this already consummate and unimprovable logodaedalic masterpiece.
     

    Yeezus

    Well-known member
  • Nov 20, 2024
    4,775
    1
    6,642
    113
    නුවරඑළියෙ වැස්සෙ, සීතලේ ඕක සාර්ථක නැහැනෙ බං. කොටින්ම dryers නැත්තම් රෙදිවත් වේලන්න බැහැනෙ. ඕක හරි උ‍ෟෂ්ණ පළාත්වලට නම්. අප්‍රේල්වලට විතරක් නැතිව අනිත් කාලවල නුවරඑළියෙ අ‍ැවිත් මාස කීපයක් ඉඳල බලහන්කො අ‍ාතල් එක. 😅

    මේකෙ 36°C වල දිගටම තියෙන නිසා කොළඹ, කුරුණෑගල පැත්තක තිබ්බා වගේම දවස් දෙක තුනෙන් ඉදෙනවා. 😍



    AI දැම්මට කියවල තේරුම් ගන්න IQ මදි නේද පොන්නයො? Failsafe එක උවමනාවට වඩා critical කියල හිතලා.

    Critical bugs 😂😂

    1. අදාළම නෑ. එ‍්ක තියෙන්නෙ sensor fail වුණොත් යන්ඩ. තත්පර 90 පැන්නා කියල මහ ලොකු ප්‍රශ්නයක් නෑ කාලය ගිහින් off වෙනවා නම්.

    2. අදාළ නෑ. Functionally same.

    3. අදාළ නෑ, තත්පර 90 නෙවෙයි 900 ක් ගියත් කමක් නෑ off වෙනවා නම්. Formula එකට දාන temperatures අනුව එහෙම වෙන්න බැහැ.

    4. දෙකම එකයි, on එක තියෙන්නෙ අවශ්‍ය වෙලාවට පාවිච්චි කරන්න තමයි.

    5. Off එකෙන් On එකට යද්දි timer එක අදාල නෑ.

    Logical issues 😅😅

    1. හදලා තියෙන්නෙම එහෙම තමයි.

    2. නැත්තෙ පකද හුත්තො? DHT22 කොහොමත් Passive නෙ. ඉතින් තත්පර 30 ක් same value නම් fail කියල ගන්න එකයි කරන්නෙ.

    3. අ‍ායෙත් එකම පක. Value change වෙනවා නම් reset එක successful තමයි වේසෝ.

    Potential safety issues 🤣🤣🤣

    1. පාවිච්චි කරන්නෙ මොළේ තියෙන එකෙක්. Realistic temperature range වලට logic එක වැඩ. මොන මන්ද මානසික පොන්නයද room temperature එකටත් වඩා අඩු එ‍්වා දාන්නෙ?

    2. එම. මේකට දාන්නෙ realistic ගණන්. කෙහෙල් තම්බනවා නෙවෙයි ඉදවනවා විතරයි.

    දැන් ගිහින් චූටි පයිය හොලවල කැරි තේ හැඳි බාගයක් යවල බුදිය ගනින්. 🤭
    ------ Post added on Aug 3, 2025 at 10:18 PM

    You're a total package ඉන්දරේ ...
    I mean you know something about almost everything
    Type of guy like මලින්ද අලහකෝන්

    It's rare to see human beings like you guys, just do something better for the human species.

    I just genuinely adore you.
     

    jhnnwp

    Well-known member
  • Jan 6, 2012
    44,208
    31,942
    113
    My very sensorium is beset by a beatific transport of such inenarrable intensity, coalesced with a measure of stupefacient obnubilation so profound, as to defy all metrical constraint, engendered by the munificent and numinous exegesis heretofore articulated. The proferred hermeneutics possess a pulchritude so exquisitely diaphanous and a veneficial radiance so potent that my essential pneuma has been irrevocably thaumaturgically enthralled.

    The prestidigitatorial chirography governing the coterminous and subsequent disquisitions constitutes an exploit of such cyclopean proportions that it induces in me a state of both apneic awe and reverential paralysis. The subterranean significations and tropological latencies that permeate the exegetical and allegorical strata are of such consummate finesse and architectonic brilliance that they have transmuted mere graphemes into a sublime apotheosis of rhetorical pyrotechnics.

    It must be averred with supereminent gravity that the consequentiality of this corpus of information is such that any maneuver aimed at its morphological adulteration or structural misprision would precipitate eschatological sequelae of a truly epic scale, culminating in the subsumption of all into an aporia of nullifidian relativity. The cardinal vaticination, were it to be subjected to a syzygial concatenation, would potentiate its efficaciousness to a previously unexampled magnitude; ergo, it is of paramount exigency that it be regarded with the most scrupulous veneration and solicitous reverence.

    The unstinting encomium and sense of eudaemonia I experience, having been afforded the singular occasion to luxuriously ensconce myself within the lambent refulgence of this transcendent paideia, beggar all powers of linguistic formulation. It stands as an irrefragable monument to the preternatural intellectual armamentarium and creative fecundity of the progenitor responsible for its genesis. The sheer noetic temerity inherent in their methodological framework, presenting a conception of such bewildering anfractuosity to a societal matrix afflicted with pervasive noetic hebetude, is an act that verges on the sublime.

    Alas, it is with a sentiment approaching lugubriousness that I must confabulate, notwithstanding my own fugacious noetic acumen, the copiosity of my epistemic reservoir, a ludic pertinacity, and what might be termed a sort of fiduciary sagacity, that subsequent to a protracted and exhaustive period of ratiocinative excogitation, I have attained the inexorable and perdurable certitude that I am divested of any substantive additament to append to this already consummate and unimprovable logodaedalic masterpiece.
    1754240406923.jpeg
     

    IndrajithGamage

    Well-known member
  • Oct 6, 2022
    13,770
    1
    15,516
    113
    Arduino ද
    Wemos Mini බං. Arduino IDE එක. Arduino මගුලෙ ගාණත් වැඩියි, feature ත් අඩුයිනෙ. ඊට වඩා ESP modules සුපිරි හැම අතින්ම. හිතපන්කො මේක arduino එකේ run කරා නම් Wifi වලට වෙනම module එකක් එපැයි. අනික 16Mhz වගේද 80Mhz, flash එකත් 32kb වෙනුවට 4Mb නෙ. 🤣
     

    remoteworkerlanka

    Well-known member
  • Jul 8, 2025
    1,567
    1,875
    113
    ඔය වගේ simple procedural type code දැන් 6 වසරේ පොඩි එවුනුත් ලියනවා පොන්නයෝ AI නැතුව.

    🤣🤣🤣
     
    • Haha
    Reactions: Clockwork