From 3e87b6328d8c3d275ab3933bf46f479a3166b5e0 Mon Sep 17 00:00:00 2001 From: Fisch Date: Sun, 29 Jan 2023 20:39:04 +0100 Subject: [PATCH] add sensor7 --- include/sensor_hcsr501.cpp | 4 +++- platformio.ini | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/include/sensor_hcsr501.cpp b/include/sensor_hcsr501.cpp index a29406a..c2cd01c 100644 --- a/include/sensor_hcsr501.cpp +++ b/include/sensor_hcsr501.cpp @@ -1,9 +1,11 @@ // PIR Sensors HC-SR501 // pir sensor needs 5v through an inductor for filtering. output level is 3.3v -// 100nF capacitor SENSOR_HCSR501_minchangeshould be soldered between pins 12 and 13 of BISS0001 to stop interference from esp causing false triggers (in some setups). source: https://www.letscontrolit.com/forum/viewtopic.php?t=671 +// 100nF capacitor should be soldered between pins 12 and 13 of BISS0001 to stop interference from esp causing false triggers (in some setups). source: https://www.letscontrolit.com/forum/viewtopic.php?t=671 // hc-sr501 should also be a few cm away from the esp. interference can cause false triggering // poti closer to jumper is sensitivity (cw increases). other poti is pulse time (cw increases). +// Set jumper to inner position (closer to IC) // time set to output around 30s pulse +// pinout is Vin, Signal, GND. Vin pin is closest to diode #include "sensor_hcsr501.h" diff --git a/platformio.ini b/platformio.ini index cb9f650..f119700 100644 --- a/platformio.ini +++ b/platformio.ini @@ -18,7 +18,8 @@ #data_dir=data_sensoresp3 #data_dir=data_sensoresp4 #data_dir=data_sensoresp5 -data_dir=data_sensoresp6 +#data_dir=data_sensoresp6 +data_dir=data_sensoresp7 #data_dir=data_sensoresp3dprinter #data_dir=data_sensoresptest @@ -80,6 +81,7 @@ lib_deps = adafruit/Adafruit SHT31 Library@^2.2.0 SPI + #Test [env:sensoresptest] @@ -321,6 +323,38 @@ lib_deps = Homie@3.0.0 claws/BH1750@1.1.4 +#Kueche +[env:sensoresp7] +platform = espressif8266 @ 2.5.0 +board = d1_mini +framework = arduino + +#monitor_port = /dev/ttyUSB0 +monitor_port = COM3 +monitor_speed = 115200 + +build_flags = + + -D SENSOR_HCSR501 + -D SENSOR_HCSR501_PIN=D6 + + -D SENSOR_VL53L1X + -D SENSOR_VL53L1X_minchange=500 + -D SENSOR_VL53L1X_senddelaymax=1000*30 + -D SENSOR_VL53L1X_readdelay=500 + + -D SENSOR_SHT31 + -D SENSOR_SHT31_humidity_minchange=5 + -D SENSOR_SHT31_temperature_minchange=0.5 + +lib_deps = + Bounce2 + SPI + ArduinoJson@6.16.1 + marvinroger/Homie @ ^3.0.1 + pololu/VL53L1X @ ^1.3.0 + adafruit/Adafruit SHT31 Library@^2.2.0 + #3D Printer [env:sensoresp3dprinter] platform = espressif8266 @ 2.5.0