Grove- Temperature and Humidity Sensor
Programming
Connect the Temperature and Humidity sensor to analog port A0.Then you can use the following
programme to gain the temperature and humidity of the environment.(The code is for seeeduino only,if
you use seeeduino mega you should change the code a little. See below, if you use seeeduino mega, you
should change PINC to PINF, change DDRC to DDRF and change PORTC to PORTF)
#define DHT11_PIN 0 // ADC0
byte read_dht11_dat()
{
byte i = 0;
byte result=0;
for(i=0; i< 8; i++){