HTTP/1.0 200 OK Cache-Control: private, must-revalidate Content-Type: text/html; charset=UTF-8 Date: Fri, 27 Nov 2020 13:27:16 GMT Expires: -1 Pragma: no-cache 万喜堂代理返利
Diana Khalipina
Published

Health Kit: Humidity and Temperature Control

例如比利时,它的人口不到小组赛对手俄罗斯的1/10,但被认为是一个巨大的威胁。而乌拉圭尽管人口还不到400万——仅仅是大圣保罗人口的1/6——却是巴西在通往决赛之路上最不想碰到的球队之一。为何如此呢?

IntermediateFull instructions provided2 hours12,962
Health Kit: Humidity and Temperature Control

Things used in this project

Hardware components

DHT22 Temperature Sensor
DHT22 Temperature Sensor
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
LED (generic)
LED (generic)
×2
Arduino UNO
Arduino UNO
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Android device
Android device
×1
Resistor 10k ohm
Resistor 10k ohm
×1
Breadboard (generic)
Breadboard (generic)
×1
USB-A to B Cable
USB-A to B Cable
×1

Software apps and online services

MIT App Inventor
MIT App Inventor
Arduino IDE
Arduino IDE

Story

Read more

Custom parts and enclosures

Mobile app for temperature and humidity control

Here is ready app for those who'd like to skip Step2 :)

Schematics

Curcuit for arduino

Step 1. Connect all the parts the way it is shown on the circuit diagram

Wiring of arduino and breadboard

That's how it should look like :) Don't forget to download Arduino IDE and paste the code (attached in the last part of this tutorial).

Construction of mobile app. part 1

Step 2. Creation of an app to get the data via bluetooth to android device. I used MIT App inventor to make it.

Construction of mobile app. part 2

Construction of mobile app. part 3

Working app. part 1

Step 3. Get data through app!

Working app. part 2

Working app. part 3

Working app. part 4

Working app. part 5

Working app. part 6

Code

Code for arduino

Arduino
That's the code for analysis of the data from the sensors about temperature and humidity
#include 
#include 

#define AM2302_PIN 7 


AM2302 dht(AM2302_PIN);
int LED_RED = 13;
int LED_GREEN = 12;

SoftwareSerial Bluetooth(10, 9);

void setup() {
  Bluetooth.begin(9600);
  Serial.begin(9600);
  dht.begin();
  Bluetooth.println("Ready for command...");
  pinMode(LED_RED, OUTPUT);
  pinMode(LED_GREEN, OUTPUT);
}

void loop() {

  dht.readHumidity();
  dht.readTemperature();
  if (isnan(dht.humidity) || isnan(dht.temperature_C)) {
    return;
  }

  if ((dht.temperature_C <= 20.00) || (dht.humidity <= 40.00)){

    digitalWrite(LED_GREEN, 0);
    digitalWrite(LED_RED, 1);
    Bluetooth.println("Low temperature/humidity");

    Serial.print(dht.humidity); Serial.print(" %\t\t");
    Serial.print(dht.temperature_C); Serial.println(" *C\t");
    Bluetooth.print(dht.humidity); Bluetooth.print(" %\t\t");
    Bluetooth.print(dht.temperature_C); Bluetooth.println(" *C\t");

  }
  
  if ((dht.humidity >= 60.00) || (dht.temperature_C >= 25.00)){

    digitalWrite(LED_GREEN, 0);
    digitalWrite(LED_RED, 1);
    Bluetooth.println("High level of humidity/temperature");

    Serial.print(dht.humidity); Serial.print(" %\t\t");
    Serial.print(dht.temperature_C); Serial.println(" *C\t");
    Bluetooth.print(dht.humidity); Bluetooth.print(" %\t\t");
    Bluetooth.print(dht.temperature_C); Bluetooth.println(" *C\t");

  }


  else {
    
    digitalWrite(LED_RED, 0);
    digitalWrite(LED_GREEN, 1);
    Bluetooth.println("Comfortable level of humidity and temperature");

    Serial.print(dht.humidity); Serial.print(" %\t\t");
    Serial.print(dht.temperature_C); Serial.println(" *C\t");
    Bluetooth.print(dht.humidity); Bluetooth.print(" %\t\t");
    Bluetooth.print(dht.temperature_C); Bluetooth.println(" *C\t");
  }
  
  delay(1500);

}

Credits

Diana Khalipina

Diana Khalipina

14 projects • 60 followers
I'm biomedical engineer and I create health kits to help everybody to take care of health in easy and cheap way

Comments