Arduino Soil Moisture Detector

 

    This project uses an Arduino Uno, a soil moisture sensor module, and jumper wires to measure soil moisture levels and display the readings in the Serial Monitor. The system reads analog data from the sensor and classifies the soil condition as “WET,” “NORMAL,” or “DRY” based on the moisture level.


Code:

void setup() {
  Serial.begin(9600);
}

void loop() {
  int moisture = analogRead(A0);

  Serial.print("Moisture: ");
  Serial.print(moisture);
  Serial.print(" - ");

  if (moisture > 700) {
    Serial.println("WET");
  } 
  else if (moisture > 400) {
    Serial.println("NORMAL");
  } 
  else {
    Serial.println("DRY");
  }

  delay(500);
}

Lesson 8: Strings | Python Beginner Course 2025 🐍

 


    In this lesson, we'll learn about strings in Python. In Python, a string is a fundamental data type used to represent sequences of characters. These characters can include letters, numbers, symbols, and whitespace. Strings are essential for handling and manipulating text in programming. Below are examples of using strings in Python.

Creating & Printing Strings:

         x="Hello"

  print(x)

Adding Strings Together  

      x="Hello"

     y="World"

  print(x + y)
Indexing Strings
        
      x="Hello"
     print(x[1])

Slicing Strings    

      x="Hello"
     print(x[0:3])