4. Demonstration
This demo is going to show you how to read temperature and humidity information from this Grove
- Temperature&Humidity Sensor (High-Accuracy &Mini) Sensor.
The Temperature and Humidity sensor is connecting to analog port I2C of Grove - Base Shield.
Grove_Temper_Humidity_TH02 library
Download
libraries.
/*
* Demo name
: TH02_dev demo
* Usage
: DIGITAL I2C HUMIDITY AND TEMPERATURE SENSOR
* Author
: Oliver Wang from Seeed Studio
* Version
: V0.1
*/
#include <TH02_dev.h>
#include "Arduino.h"
#include "Wire.h"
void setup()
{
Serial.begin(9600);
Serial.println("****TH02_dev demo by seeed studio****\n");
/* Power up,delay 150ms,until voltage is stable */
delay(150);
/* Reset HP20x_dev */
TH02.begin();
delay(100);
/* Determine TH02_dev is available or not */
Serial.println("TH02_dev is available.\n");
// start serial for output
5
and install the library into Arduino
Need help?
Do you have a question about the Grove - Temperature&Humidity Sensor and is the answer not in the manual?