18 * You should have received a copy of the GNU General Public License |
18 * You should have received a copy of the GNU General Public License |
19 * along with EC-65K; see the file COPYING. If not, write to the Free |
19 * along with EC-65K; see the file COPYING. If not, write to the Free |
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
21 *****************************************************************************/ |
21 *****************************************************************************/ |
22 |
22 |
|
23 #include "../config.h" |
|
24 #include <stdio.h> |
|
25 #include <stdlib.h> |
|
26 #include <stdint.h> |
|
27 #include <stdarg.h> |
|
28 #include <syslog.h> |
|
29 #include <unistd.h> |
|
30 |
23 #include "dht11.h" |
31 #include "dht11.h" |
24 |
32 |
25 #ifdef HAVE_WIRINGPI_H |
33 #ifdef HAVE_WIRINGPI_H |
|
34 #include <wiringPi.h> |
26 |
35 |
27 #define MAXTIMINGS 100 |
36 #define MAXTIMINGS 100 |
28 |
37 |
29 int dht11_pin = -1; |
38 int dht11_pin = -1; |
30 int dht11_temperature = -1; |
39 int dht11_temperature = -1; |
31 int dht11_humidity = -1; |
40 int dht11_humidity = -1; |
32 int dht11_valid = false; |
41 int dht11_valid = FALSE; |
33 int dht11_t_offset = 0; |
42 int dht11_t_offset = 0; |
34 int dht11_h_offset = 0; |
43 int dht11_h_offset = 0; |
35 |
44 |
36 |
45 |
37 |
46 |