Skip to main content

Soil Moisture sensor with Arduino in Tinkercad | how to use soil moisture sensor in Tinkercad

  Soil Moisture sensor with Arduino in Tinkercad | how to use soil moisture sensor in Tinkercad Circuit diagram: Arduino Sketch: // C++ code // int moisture_data = 0; void setup() {   pinMode(A0, INPUT);   Serial.begin(9600);   pinMode(12, OUTPUT);   pinMode(6, OUTPUT); } void loop() {   moisture_data = analogRead(A0);   Serial.println(moisture_data);   if (moisture_data < 21) {     digitalWrite(12, HIGH);     digitalWrite(6, HIGH);   } else {     digitalWrite(12, LOW);     digitalWrite(6, LOW);   }   delay(10); // Delay a little bit to improve simulation performance }

Soil moisture sensor with Arduino IoT cloud | IOT Smart Plant Monitoring System

 

Soil moisture sensor with Arduino IoT cloud | IOT Smart Plant Monitoring System

Hello everyone !! in this video, you learn about the following things 1. How to interface soil moisture sensor with esp32 board 2. How to control pump using the Arduino IoT cloud platform 3. How to create a dashboard 4. How to install the Arduino Create agent. 5. how to do the programming in Arduino web-based editor if you want to know more about the Arduino IoT cloud platform then watch my previous video Getting started with Arduino IoT cloud | Arduino IoT cloud with Esp32🔥 #arduinoiotcloud #esp32 https://youtu.be/I92CX2V5NxA Checkout the previous series videos! [E01]Getting started with Esp32 board | how to program esp32 board using Arduino ide https://youtu.be/R4o2IHZm3E8 [E02] Esp32 analog input | read analog values with arduino IDE and potentiometer https://youtu.be/63EPm6S7-UQ [E03] Esp32 Built in Hall effect sensor | how to use esp32 built in hall effect sensor https://youtu.be/DKdehe1BzYo [E04] how to use esp32 capacitive touch sensor pin | controlling AC appliances using esp32 touch pin https://youtu.be/Lsm7qXU_9ZY [E05] OLED Display with Esp32 | How to use OLED display with Esp32 https://youtu.be/jms9ccgyEDQ [E06] IOT based remote sensor data monitoring | Sensor data monitoring using Esp32 and Ubidots . https://youtu.be/8Df9omyF4HY [E07] Sending sensor data to google sheet using esp32 | How to send sensor data to google sheet https://youtu.be/RpQxJkEZ-fA

Arduino code:

#include "arduino_secrets.h"
/* 
  Sketch generated by the Arduino IoT Cloud Thing "Untitled"
  https://create.arduino.cc/cloud/things/d96be7c3-073d-4272-836b-3f69ceedd1a6 

  Arduino IoT Cloud Variables description

  The following variables are automatically generated and updated when changes are made to the Thing

  int sm_sensor;
  bool esp32_relay1;

  Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
  which are called when their values are changed from the Dashboard.
  These functions are generated with the Thing and added at the end of this sketch.
*/

#include "thingProperties.h"
int relay1=4;
int soil_sensor=34;

void setup() {
  // Initialize serial and wait for port to open:
  Serial.begin(9600);
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is found
  delay(1500); 
  pinMode(relay1,OUTPUT);
  

  // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  
  /*
     The following function allows you to obtain more information
     related to the state of network and IoT Cloud connection and errors
     the higher number the more granular information you’ll get.
     The default is 0 (only errors).
     Maximum is 4
 */
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();
  // Your code here 
  sm_sensor=analogRead(soil_sensor);
  delay(500);
  if(sm_sensor>1200)
  //modify this value based on soil moisture sensor reading
  {
    digitalWrite(relay1,LOW);
  }
  else
  {
    digitalWrite(relay1,);
  }
  
}


/*
  Since Esp32Relay1 is READ_WRITE variable, onEsp32Relay1Change() is
  executed every time a new value is received from IoT Cloud.
*/
void onEsp32Relay1Change()  {
  // Add your code here to act upon Esp32Relay1 change
 if(esp32_relay1)
 {
   digitalWrite(relay1,HIGH);
 }
 else
 {
   digitalWrite(relay1,LOW);
 }
}


For complete video tutorial 






For supporting Like, Share, and SUBSCRIBE! Follow me on! Facebook:-https://www.facebook.com/impulsetech1​​​. Instagram : https://www.instagram.com/impulsetech... Instagram: https://www.instagram.com/yogii_bawane/​ contact us: impulsetech101@gmail.com

Comments

Post a Comment

If you any query please comment

Popular posts from this blog

Water level monitoring system using IoT | IoT based water level using Nodemcu ESP8266 & ESP32

Water level monitoring system using IoT | IoT based water level using Nodemcu ESP8266 & ESP32 Hello Everyone! I have come up with new tutorial Water level monitoring system using IoT | IoT based water level using Nodemcu ESP8266 & ESP32 For Code & Circuit Diragram: In this video what you will learn about? 1. How to configure the new Blynk IoT Platform. 2. How to setup web dashboard 3. How to create template in blynk iot 4. How to interface ultrasonic sensor with node mcu esp8266. 5. How to read ultrasonic sensor with esp8266 1.You can Watch Playlist on New Blynk IoT Platfom New Blynk IoT platform with esp32 | how to setup automation in Blynk IoT app https://youtu.be/O2HZuu4KtIc 2.How to create events in blynk IoT platform | events in new Blynk IoT platform 🔥🔥 https://youtu.be/X5zVaGk8QV0 3.IoT Based smart garden monitoring system | Smart plant monitoring using Blynk IoT https://youtu.be/GTdxD5vQwy0 4.Water level monitoring system using IoT | IoT based

Soil Moisture sensor with Arduino in Tinkercad | how to use soil moisture sensor in Tinkercad

  Soil Moisture sensor with Arduino in Tinkercad | how to use soil moisture sensor in Tinkercad Circuit diagram: Arduino Sketch: // C++ code // int moisture_data = 0; void setup() {   pinMode(A0, INPUT);   Serial.begin(9600);   pinMode(12, OUTPUT);   pinMode(6, OUTPUT); } void loop() {   moisture_data = analogRead(A0);   Serial.println(moisture_data);   if (moisture_data < 21) {     digitalWrite(12, HIGH);     digitalWrite(6, HIGH);   } else {     digitalWrite(12, LOW);     digitalWrite(6, LOW);   }   delay(10); // Delay a little bit to improve simulation performance }

DS18B20 Temperature sensor with new Blynk IOT Platform | DS18B20 with Esp32 & Blynk IoT Cloud

DS18B20 Temperature sensor with new Blynk IOT Platform | DS18B20 with Esp32 & Blynk IoT Cloud   Hello Everyone! I have come up with new tutorial based on the all new Blynk IoT platform. which is DS18B20 Temperature sensor with new Blynk IOT Platform | DS18B20 with Esp32 & Blynk IoT Cloud #iot #blynk In this video what you will learn about? 1. How to configure the new Blynk IoT Platform. 2. How to interface DS18B20 sensor with esp32 4. How to configure mobile blynk IoT platform 5. How to setup Automation in Blynk IoT 1.You can Watch Playlist on New Blynk IoT Platfom New Blynk IoT platform with esp32 | how to setup automation in Blynk IoT app | #iot #blynk #esp32 https://youtu.be/O2HZuu4KtIc 2.How to create events in blynk IoT platform | events in new Blynk IoT platform 🔥🔥 #blynk #esp32 #iot https://youtu.be/X5zVaGk8QV0 3.IoT Based smart garden monitoring system | Smart plant monitoring using Blynk IoT #iot #blynk #esp32 https://youtu.be/GTdxD5vQwy0 4.Water