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 }

Monitoring sensor data on ubidots IoT platform | ESP32 with ubidots using MQTT

 Monitoring sensor data on ubidots IoT platform | ESP32 with ubidots using MQTT

In this video what you will learn? 1. How to configure the Ubidots IoT platform. 2. Interfacing light sensor with esp32 board 3. How to send sensor data to ubidots iot cloud 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 water level using Nodemcu ESP8266 & ESP32 https://youtu.be/WsfyeBtGXNM 5.Monitoring MPU6050 data over blynk IoT platform | IoT based Vibration Monitoring using Esp32 MPU6050 https://youtu.be/zFbH-f8mhAE 6.IoT Based weather station using BMP280 & ESP32 | BMP280 pressure and temperature sensor with Blynk https://youtu.be/4CysMQn-OLE 7.Home automation using blynk IoT platform | home automation project using esp32 #homeautomation https://youtu.be/Moow367kucU you can watch my previous series videos based on Arduino IoT cloud Platform 1.Getting started with Arduino IoT cloud | Arduino IoT cloud with Esp32🔥 https://youtu.be/I92CX2V5NxA 2. Home automation using Arduino IoT cloud | controlling relay using Arduino IoT cloud https://youtu.be/19DYvM-N2ps 3. Soil moisture sensor with Arduino IoT cloud | IOT Smart Plant Monitoring System #iot #esp32 https://youtu.be/VryVyi9Kj0Y 4. How to send sensor data from Arduino IoT cloud to Email | webhook & IFTTT with Arduino IoT cloud https://youtu.be/KwkAI8ZT7fo 5. Sending sensor data to google sheet using Arduino IoT cloud | log sensor data in cloud https://youtu.be/D5gBc29V8xg

Arduino Code:

/******************************************

 *

 * This example works for both Industrial and STEM users.

 *

 * Developed by Jose Garcia, https://github.com/jotathebest/

 *

 * ****************************************/


/****************************************

 * Include Libraries

 ****************************************/

#include "UbidotsEsp32Mqtt.h"


/****************************************

 * Define Constants

 ****************************************/

const char *UBIDOTS_TOKEN = "";  // Put here your Ubidots TOKEN

const char *WIFI_SSID = "impulsetech";      // Put here your Wi-Fi SSID

const char *WIFI_PASS = "impulse567";      // Put here your Wi-Fi password

const char *DEVICE_LABEL = "esp32";   // Put here your Device label to which data  will be published

const char *VARIABLE_LABEL = "sensordata";

const char *VARIABLE_LABEL2 = "light";// Put here your Variable label to which data  will be published


const int PUBLISH_FREQUENCY = 5000; // Update rate in milliseconds


unsigned long timer;

uint8_t analogPin = 34;

uint8_t analogPin2 = 35;// Pin used to read data from GPIO34 ADC_CH6.


Ubidots ubidots(UBIDOTS_TOKEN);


/****************************************

 * Auxiliar Functions

 ****************************************/


void callback(char *topic, byte *payload, unsigned int length)

{

  Serial.print("Message arrived [");

  Serial.print(topic);

  Serial.print("] ");

  for (int i = 0; i < length; i++)

  {

    Serial.print((char)payload[i]);

  }

  Serial.println();

}


/****************************************

 * Main Functions

 ****************************************/


void setup()

{

  // put your setup code here, to run once:

  Serial.begin(115200);

  // ubidots.setDebug(true);  // uncomment this to make debug messages available

  ubidots.connectToWifi(WIFI_SSID, WIFI_PASS);

  ubidots.setCallback(callback);

  ubidots.setup();

  ubidots.reconnect();


  timer = millis();

}


void loop()

{

  // put your main code here, to run repeatedly:

  if (!ubidots.connected())

  {

    ubidots.reconnect();

  }

  if (abs(millis() - timer) > PUBLISH_FREQUENCY) // triggers the routine every 5 seconds

  {

    float value = analogRead(analogPin);

    float value2= analogRead(analogPin2);

    ubidots.add(VARIABLE_LABEL, value);

    ubidots.add(VARIABLE_LABEL2, value2);// Insert your variable Labels and the value to be sent

    ubidots.publish(DEVICE_LABEL);

    timer = millis();

  }

  ubidots.loop();

}

Video Tutorial:



You can connect me on Facebook : facebook.com/impulsetech101 Instagram: instagram.com/impulsetechy/ Linkdin: linkedin.com/in/yogesh-bawane Linkdin: linkedin.com/company/impulse-tech-robotics Blog : impulsetechx.blogspot.com/

Comments

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 }

Getting Started with the Arduino IoT Cloud using Esp32 & DHT-11

  Getting Started with the Arduino IoT Cloud using Esp32 Introduction: The Internet of Things has given rise to plenty of exciting new projects for makers. It's both interesting and practical to be able to develop remote sensors and gadgets. Allowing IoT devices from multiple manufacturers to interact with your innovations will open up a lot of possibilities, including some you might not have considered before. In this getting started guide of Arduino IOT cloud we will learn about how to use Arduino IOT cloud with Esp32 board. Arduino IOT cloud What is Arduino IOT cloud? Arduino IoT Cloud is a web-based service that allows users to create connected devices quickly, easily, and securely. Multiple devices can be linked together and data can be exchanged in real-time. Users can also able to monitor the data using a simple user interface from anywhere. one can also use the android application for monitoring and controlling the devices. Because Arduin...