2024-09-2800

This commit is contained in:
hans-jurgen 2024-09-28 15:17:09 +02:00
parent 1ff02fcd43
commit 6f21fe7252
2 changed files with 13 additions and 12 deletions

View File

@ -12,9 +12,10 @@
platform = espressif8266
board = d1
framework = arduino
monitor_port = COM6
monitor_port = /dev/ttyUSB0
monitor_speed = 74800
monitor_filters = time
upload_port = /dev/ttyUSB0
board_build.filesystem = littlefs
lib_deps =
knolleary/PubSubClient @ 2.8
@ -35,12 +36,12 @@ build_flags =
build_flags = ${env.build_flags}
-DDEBUG=0
-DNOADS=1
-DNAME=\"WETTERSTATIONEPPINGEN\"
-DSTASSID=\"St.-Peters-Gasse-Post\"
-DSTAPSK=\"1952994784599318\"
-DNAME=\"WETTERSTATIONEPPINGEN2\"
-DSTASSID=\"MagentaWLAN-RGDO\"
-DSTAPSK=\"93329248424922704583\"
-DGATEWAY=\"192.168.127.1\"
-DDNS=\"192.168.127.1\"
-DKMYIP=\"192.168.127.48\"
-DKMYIP=\"192.168.127.45\"
-Dmqtt_server=\"hjkmqtt.dedyn.io\"
-Dmqtt_port=61883
-DTERROR=5

View File

@ -25,7 +25,7 @@ void pulse_pin(uint8_t pin);
WiFiClientSecure espClient;
PubSubClient client(espClient);
#include<mess_htu21.h>
//#include<mess_htu21.h>
#include <mess_BMP280.h>
@ -109,14 +109,14 @@ void setup() {
//digitalWrite(BUILTIN_LED, HIGH);
//Serial.print("STATUS (Systemmeldung): "); Serial.println(SystemStatus);
#if (MQTT == 0)
init_HTU21();
Init_BMP280();
//init_HTU21();
//Init_BMP280();
initADS();
init_MCP9808();
#endif
//AKKU = getBattery(korectur); // ca. 170 ms
// ca. 280 ms
read_HTU21D();
//read_HTU21D();
read_BMP_280();
//MessungADS();
setup_wifi(); // ca. 4,5 s
@ -131,7 +131,7 @@ void setup() {
Serial.print("ID: \t\t"); Serial.println(deviceId);
// ca. 5 s
espClient.setFingerprint(mqtt_fprint);
//espClient.setFingerprint(mqtt_fprint);
client.setServer(mqtt_server, mqtt_port);
client.setCallback(callback);
//----------
@ -147,7 +147,7 @@ void loop() {
int currentMillis = millis();
if (currentMillis - previousMillis >= 10000) {
previousMillis = currentMillis;
read_HTU21D();
//read_HTU21D();
read_BMP_280();
valTemp = getTemperature_MCP9808();
#if(NOADS== 1)
@ -158,7 +158,7 @@ void loop() {
client.publish(topic, ADSData.Solar, true);
#endif
#if(MQTT == 0)
M2M_HTU21D(hostname.c_str());
//M2M_HTU21D(hostname.c_str());
M2M_BMP280(hostname.c_str());
M2M_Temperatur_MCP9808(hostname.c_str());
#endif