Added DHT library to extras and sample code to examples

This commit is contained in:
jsuiker 2016-04-20 22:03:18 +00:00
parent 2badeed523
commit 99eba80c4d
5 changed files with 221 additions and 0 deletions

17
extras/dht/dht.h Normal file
View file

@ -0,0 +1,17 @@
/*
* Part of esp-open-rtos
* Copyright (C) 2016 Jonathan Hartsuiker (https://github.com/jsuiker)
* BSD Licensed as described in the file LICENSE
*
*/
#ifndef __DTH_H__
#define __DHT_H__
#include "FreeRTOS.h"
bool dht_wait_for_pin_state(uint8_t pin, uint8_t interval, uint8_t timeout, bool expected_pin_sate, uint8_t * counter);
bool dht_fetch_data(int8_t pin, int8_t * humidity, int8_t * temperature);
#endif