Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2025:avaduva:andrei.iacob1009 [2025/05/29 15:31]
andrei.iacob1009 [Software Design]
pm:prj2025:avaduva:andrei.iacob1009 [2025/05/29 15:32] (current)
andrei.iacob1009 [Software Design]
Line 341: Line 341:
       checkWater();​       checkWater();​
     }     }
-    ​ 
     delay(10000);​ //10sec = 10000     delay(10000);​ //10sec = 10000
     counter++;     counter++;
Line 359: Line 358:
     lcd.setCursor(0, ​ 1);     lcd.setCursor(0, ​ 1);
     lcd.print("​Moisture:​ " + String(moisture) + " ​  "​);​     lcd.print("​Moisture:​ " + String(moisture) + " ​  "​);​
-    ​ 
     if (moisture ​ <= 300) {     if (moisture ​ <= 300) {
       water_count++;​       water_count++;​
       //​Serial.println(water_count);​       //​Serial.println(water_count);​
-      ​ 
       if(water_count == 5){//To wait for the water  to go through the pot.       if(water_count == 5){//To wait for the water  to go through the pot.
         watering();         watering();
Line 382: Line 379:
     digitalWrite(TRIG,​LOW);​     digitalWrite(TRIG,​LOW);​
     duration_us = pulseIn(ECHO,​HIGH);​     duration_us = pulseIn(ECHO,​HIGH);​
-    ​ 
     if (duration_us > 0)  {     if (duration_us > 0)  {
       distance = 0.017 * duration_us; ​       distance = 0.017 * duration_us; ​
       Serial.print(distance);​       Serial.print(distance);​
       Serial.println(" ​ cm");       Serial.println(" ​ cm");
-      ​ 
       if(distance > 8.4) {       if(distance > 8.4) {
         digitalWrite(LED,​ HIGH);         digitalWrite(LED,​ HIGH);
Line 393: Line 388:
         digitalWrite(LED,​ LOW);         digitalWrite(LED,​ LOW);
       }       }
-      ​ 
     }     }
   }   }
Line 412: Line 406:
     Serial.println(p);​     Serial.println(p);​
     Serial.println();​     Serial.println();​
- 
     lcd.setCursor(0,​ 0);     lcd.setCursor(0,​ 0);
     lcd.print(String(t)+"​C ​ ");     lcd.print(String(t)+"​C ​ ");
Line 441: Line 434:
     delay(1000);​ // Allow LCD to complete before sound starts     delay(1000);​ // Allow LCD to complete before sound starts
     playMelody();​     playMelody();​
- 
     // After melody, update sensor readings     // After melody, update sensor readings
     lcd.clear();​     lcd.clear();​
pm/prj2025/avaduva/andrei.iacob1009.1748521902.txt.gz · Last modified: 2025/05/29 15:31 by andrei.iacob1009
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0