Supports the inter-integrated circuit (I2C) data communication method.
ZE08-CH2O
Formaldehyde detection sensor
Supports the universal asynchronous receiver-transmitter (UART) data communication
method.
Hardware connection diagram
Connect the SCL (clock line) and SDA (data line) pins of the temperature and humidity
sensor (DHT12) to the I2C SCL and SDA pins of the development board.
Connect the TXD (transmit data) pin of the formaldehyde detection sensor (ZE08-CH2O)
to the RXD (receive data) pin of the development board, and connect the RXD pin of
ZE08-CH2O to the TXD pin of the development board.
Create a product and a device in the IoT Platform console
On the Overview page, find the instance that you want to manage and click the instance name to go
to the Instance Details page.
Important Enterprise Edition instances are available in the China (Shanghai) and Japan (Tokyo) regions. If the Enterprise Edition instances are unavailable in the region that you
select, skip this step.
In the left-side navigation pane, choose Devices > Products.
On the Products page, click Create Product to create a product. For more information, see Create a product.
Create a TSL model.
On the page that appears after the product is created, click Create TSL.
On the Product Details page, click the Define Feature tab. Click Edit Draft and then Add Self-defined Feature.
Add the properties described in the following table.
Property
Identifier
Data Type
Valid value
Description
Temperature
temperature
float
-50 to 100
The temperature data collected by the temperature and humidity sensor DHT12.
Humidity
humidity
float
0 to 100
The humidity data collected by the temperature and humidity sensor DHT12.
Formaldehyde concentration
ch2o
double
0 to 3
The formaldehyde concentration collected by the formaldehyde detection sensor ZE08-CH2O.
Click Release online to publish the TSL model.
Create a device.
On the Devices page, click Add Device to add a device to the product. For more information, see Create a device.
Develop an Android Things device
Use Android Studio to create an Android Things project and add the network permission.
After the device is started, log on to the IoT Platform console. On the Device Details page, view the real-time property data of the device in the Status section.