enable pir sensor pullup and fix dht library

This commit is contained in:
interfisch 2020-09-26 19:48:49 +02:00
parent 2c55bf2b98
commit 5f2e49f7a2
2 changed files with 4 additions and 3 deletions

View File

@ -18,6 +18,6 @@ monitor_speed = 115200
lib_deps =
DHT sensor library@1.3.10
adafruit/DHT sensor library@1.3.10
BH1750@1.1.4
Homie@3.0.0

View File

@ -3,7 +3,8 @@
#include "Arduino.h"
#include "DHT.h"
#include <Adafruit_Sensor.h> //required for dht library
#include <DHT.h>
#include <Wire.h>
#include <BH1750.h>
@ -54,7 +55,7 @@ void setup() {
Serial.println();
Serial.println("Welcome");
pinMode(PIRPIN, INPUT);
pinMode(PIRPIN, INPUT_PULLUP);
Serial.println("initializing dht");
dht.begin(); // dht pins: 1=power, 2=data, 3=NC, 4=GND. 10k from data to power needed