25-12-1410 BORIS BMP
This commit is contained in:
@@ -13,10 +13,10 @@ platform = espressif8266
|
||||
board = d1
|
||||
framework = arduino
|
||||
board_build.filesystem = littlefs
|
||||
;monitor_port = /dev/ttyUSB0
|
||||
monitor_port = /dev/ttyUSB0
|
||||
monitor_speed = 74800
|
||||
monitor_filters = time
|
||||
;upload_port = /dev/ttyUSB0
|
||||
upload_port = /dev/ttyUSB0
|
||||
lib_deps =
|
||||
knolleary/PubSubClient @ 2.8
|
||||
adafruit/Adafruit HTU21DF Library @ 1.0.5
|
||||
@@ -25,6 +25,7 @@ lib_deps =
|
||||
adafruit/Adafruit BusIO @ 1.16.1
|
||||
adafruit/Adafruit BME280 Library @ 2.2.4
|
||||
adafruit/Adafruit Unified Sensor @ 1.1.14
|
||||
adafruit/Adafruit BMP280 Library @ 2.6.8
|
||||
|
||||
build_flags =
|
||||
-DTEMPTEST33=1
|
||||
@@ -74,6 +75,7 @@ build_flags = ${env.build_flags}
|
||||
[env:boris] ; Produktivsystem:
|
||||
build_flags = ${env.build_flags}
|
||||
-DDEBUG=0
|
||||
-DBMP=0
|
||||
-DEMAIL=\"koerner.c.m@gmail.com\"
|
||||
-DNAME=\"WETTERSTATIONBORIS\"
|
||||
-DSTASSID=\"FRITZ!Box7362SL\"
|
||||
|
||||
17
src/main.cpp
17
src/main.cpp
@@ -25,8 +25,8 @@ PubSubClient client(espClient);
|
||||
|
||||
#include<mess_htu21.h>
|
||||
|
||||
//#include <mess_BMP280.h>
|
||||
#include <mess_BME280.h>
|
||||
#include <mess_BMP280.h>
|
||||
//#include <mess_BME280.h>
|
||||
|
||||
//#include <mess_Ub.h>
|
||||
#include <mess_Ub_old.h>
|
||||
@@ -94,8 +94,11 @@ void setup() {
|
||||
delay(500);
|
||||
#if (MQTT == 0)
|
||||
init_HTU21();
|
||||
//Init_BMP280();
|
||||
#ifdef BMP
|
||||
Init_BMP280();
|
||||
#else
|
||||
Sensor_BME280();
|
||||
#endif
|
||||
|
||||
init_MCP9808();
|
||||
initADS();
|
||||
@@ -116,9 +119,9 @@ void setup() {
|
||||
if (F_ADS1115 == true){
|
||||
MessungADS();
|
||||
}
|
||||
/* if (F_BMP280 == true){
|
||||
if (F_BMP280 == true){
|
||||
read_BMP_280();
|
||||
}*/
|
||||
}
|
||||
if (F_MCP9808 == true){
|
||||
valTemp = getTemperature_MCP9808();
|
||||
}
|
||||
@@ -153,7 +156,11 @@ void loop() {
|
||||
}
|
||||
|
||||
if (F_HTU_21D) M2M_HTU21D(hostname.c_str());
|
||||
#ifdef BMP
|
||||
M2M_BMP280(hostname.c_str());
|
||||
#else
|
||||
M2M_BME280(hostname.c_str());
|
||||
#endif
|
||||
if (F_MCP9808) M2M_Temperatur_MCP9808(hostname.c_str());
|
||||
sprintf(msg,"%ld", Feldstaerke);
|
||||
sprintf(topic, "%s%s%s", "hjk/devices/", hostname.c_str(), "/telemetry/RSSI" );
|
||||
|
||||
Reference in New Issue
Block a user