Temperature & Humidity Device

From Microduino Wiki
Jump to: navigation, search
Language: English  • 中文

Objective

To send environment data acquired from temperature and humidity sensor and photosensitive sensor to a phone through Microduino-BT.

Principle

Equipment

Module Number Function
Microduino-CoreUSB 1 Core board
Microduino-Sensorhub 1 Sensor pin board
Microduino-BT 1 Bluetooth module
Microduino-Temp&Hum 1 Temperature and humidity sensor
[[Microduino-Light] 1 photosensitive sensor

Document

Android Client: Note: The new version BT 4.0 is supported by Android 4.3 or higher. Here we offer Android APP.


APP Download:'File:Microduino-Temp&Hum-APP.zip

Hardware Buildup

  • Setup 1:Stack CoreUSB, BT and Sensorhub.
  • Setup 2:Connect Microduino-Light to the A0 pin of Sensorhub.
Microduino-sensorhub rule.JPG
  • Setup 3:Connect Microduino-Temp&Hum to A4 and A5 pins of the Sensorhub.

Software Debugging

  • Setup 1:Build development environment by connecting CoreUSB to the computer and downloading program code.

ble_THL

  • Setup 2:Download Android Client, decompress, install and open it. In this case, a Bluetooth opening notice will come out if you don't open the Bluetooth.
Microduino BT Serial 1.png
  • Setup 3:Click "SCAN" on the top right and name it as Microduino, then click and connect.
Microduino BT Serial 2.png
  • On the top right, you'll see Serial Present at first and then it turns to Serial Ready, which means starting normal communication. An environment data will be uploaded every one second
Microduino BT Temp&Hum.png
  • Code description: Receive Bluetooth information for one part and control light combination of the light based on analog values for the other part.
    • Read Bluetooth information

Communication serial port of CoreUSB and BT:Serial1

#define my_Serial Serial1
    • Light Color Change

When there is BT connection, it will send one environment data for every second.

Result

By Microduino, you can achieve light control with your phone and get any color you want. You can also build a beautiful shell for this project since mCookie can be easily stacked with LEGO boards.

Video