Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
Yesid León
Published © Apache-2.0

IOT System for Mushroom Cultivation Monitoring

In agriculture, production and control allows for better results by using IoT, AI and technological platforms that operate in real time.

IntermediateProtip5 hours299
IOT System for Mushroom Cultivation Monitoring

Things used in this project

Hardware components

ESP32
Espressif ESP32
×1
DHT22 Temperature Sensor
DHT22 Temperature Sensor
×1
Grove - Gas Sensor(MQ2)
Seeed Studio Grove - Gas Sensor(MQ2)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

Code Arduino

Arduino
Code Arduino
#include "SensorDHT22.h"
#include "SensorMQ135.h"
#include "WifiManager.h"
#include "ThingsBoardManager.h"
 
void setup() {
  Serial.begin(115200);
  Serial.println("Hello, ESP32!");

  setupMQ135Sensor();
  setupSensorDHT22();

  setupThingsBoard();
  connectToWiFi();
  connectToThingsBoard();
}

void loop() {
  TempAndHumidity data = getTempAndHumidity();
  float temp = data.temperature;
  int hum = data.humidity;
  sendDataToThingsBoard(temp, hum);

  int ppm = getPPM();
  sendPPMDataToThingsBoard(ppm);
  checkMaxTemperature(temp);
}

Credits

Yesid León

Yesid León

3 projects • 2 followers

Comments