AM2312 Temp.& Hum Sensor

From Microduino Wiki
Jump to: navigation, search

Function of the Modules

Outline

Measure the temperature and humidity with the temperature and humidity sensor, and use the serial port monitor to print the tested data.

Bill of Materials

  • Module
Module Number Function
mCookie-CoreUSB 1 Core board
[[mCookie-Hub] 1 Sensor adapter
Microduino-Temp&Hum 1 Temperature and humidity sensor
  • Other Hardware Equipment
    • USB cable one piece
Temp-Hum.jpg

Building Hardware

  • Setup 1:Connect the temperature and humidity sensor with the IIC of Hub, and it can only be connected to the IIC.
MCookie-Temp&Hum-sensor.JPG
  • Setup 2:Connect CoreUSB, Hub, and the temperature and humidity together, and connect them to the computer with USB cable.

Mixly Programming

  • Step1:Because the serial port monitor is used, you need to find the serial port communication control in the communication.
Mixly Serial.jpg
  • Step2:The introduction of the serial port communication control
  • Step3:Find the temperature and humidity module in Microduino sensors.
  • The introduction of the temperature and humidity module.
  • If you want to print the content of the text that the custom defined, you can find it in the text.
Mixly text.jpg
  • The introduction of the overall code

Debugging

  • Step1:Choose the board card(Core USB 32U4) and COM port(the default is automatic identification)correctly.
Mixly board COM.jpg
  • Step2:Open the serial port monitor.
Mixly COMXX.jpg
  • Step3:Confirm that the serial port baud rate is consistent with the set.
Mixly COMXX ok.jpg
  • Step4:Observe the data, and when you hold the sensor in hands, you can see that the temperature and the humidity will increase, and the humidity increases faster than the temperature.