Difference between revisions of "Temperature & Humidity Sensor"
From Microduino Wiki
(→Experiment: Detect Temp&Hum Values) |
|||
Line 68: | Line 68: | ||
</source> | </source> | ||
*Select the right board from Tools→Serial Port in Arduino IDE and download the program. | *Select the right board from Tools→Serial Port in Arduino IDE and download the program. | ||
− | [[file: | + | [[file:uploadhum.JPG|500px|center]] |
*Open the serial monitor after download; The value displayed reflects the current temperature and humidity. | *Open the serial monitor after download; The value displayed reflects the current temperature and humidity. | ||
− | [[file:mCookie-Temp-Hum- | + | [[file:mCookie-Temp-Hum-reshum.JPG|500px|center]] |
===Program Debugging === | ===Program Debugging === |
Revision as of 02:29, 5 November 2015
ContentsOutlineThis tutorial adopts AM2321 digital temperature and humidity sensor. Microudino-Temp&Hum consists of a capacitive humidity sensor and a high precision integrated temperature measuring component, connecting with a high performance microprocessor. Therefore, the product has the advantages of excellent quality, fast response, high anti-interference and high comparability in price and etc. Specification
DevelopmentEquipment
Preparation
Experiment: Detect Temp&Hum Values
#include <Wire.h>
#include <AM2321.h>
void setup() {
Serial.begin(9600);
}
void loop() {
readByAM2321();
delay(500);
}
void readByAM2321()
{
AM2321 am2321;
am2321.read();
Serial.print("(");
Serial.print(am2321.temperature/10.0);
Serial.print(", ");
Serial.print(am2321.humidity/10.0);
Serial.println(')');
}
Program Debugging
ApplicationMicroudino-Temp&Hum can be widely applied in HVAC system, dehumidifier, testing and detection equipment, consumer goods, automobile, automatic control, data recorder, weather station, appliances, humidity control, medical care, and other relative humidity detection control. Video |