diff --git a/.idea/serialmonitor_settings.xml b/.idea/serialmonitor_settings.xml
index ce32dc3..af0a408 100644
--- a/.idea/serialmonitor_settings.xml
+++ b/.idea/serialmonitor_settings.xml
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 526910d..4ada0a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,8 +5,12 @@
# please create `CMakeListsUser.txt` in the root of project.
# The `CMakeListsUser.txt` will not be overwritten by PlatformIO.
-cmake_minimum_required(VERSION 3.2)
-project("PumpenSteuerung")
+cmake_minimum_required(VERSION 3.13)
+set(CMAKE_SYSTEM_NAME Generic)
+set(CMAKE_C_COMPILER_WORKS 1)
+set(CMAKE_CXX_COMPILER_WORKS 1)
+
+project("PumpenSteuerung" C CXX)
include(CMakeListsPrivate.txt)
@@ -15,74 +19,14 @@ include(CMakeListsUser.txt)
endif()
add_custom_target(
- PLATFORMIO_BUILD ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion run "$<$>:-e${CMAKE_BUILD_TYPE}>"
+ Production ALL
+ COMMAND platformio -c clion run "$<$>:-e${CMAKE_BUILD_TYPE}>"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_custom_target(
- PLATFORMIO_BUILD_VERBOSE ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion run --verbose "$<$>:-e${CMAKE_BUILD_TYPE}>"
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
-add_custom_target(
- PLATFORMIO_UPLOAD ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion run --target upload "$<$>:-e${CMAKE_BUILD_TYPE}>"
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
-add_custom_target(
- PLATFORMIO_CLEAN ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion run --target clean "$<$>:-e${CMAKE_BUILD_TYPE}>"
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
-add_custom_target(
- PLATFORMIO_MONITOR ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion device monitor "$<$>:-e${CMAKE_BUILD_TYPE}>"
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
-add_custom_target(
- PLATFORMIO_TEST ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion test "$<$>:-e${CMAKE_BUILD_TYPE}>"
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
-add_custom_target(
- PLATFORMIO_PROGRAM ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion run --target program "$<$>:-e${CMAKE_BUILD_TYPE}>"
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
-add_custom_target(
- PLATFORMIO_UPLOADFS ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion run --target uploadfs "$<$>:-e${CMAKE_BUILD_TYPE}>"
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
-add_custom_target(
- PLATFORMIO_BUILD_DEBUG ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion run --target debug "$<$>:-e${CMAKE_BUILD_TYPE}>"
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
-add_custom_target(
- PLATFORMIO_UPDATE_ALL ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion update
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
-add_custom_target(
- PLATFORMIO_REBUILD_PROJECT_INDEX ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion init --ide clion
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
-add_custom_target(
- PLATFORMIO_DEVICE_LIST ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion device list
+ Debug ALL
+ COMMAND platformio -c clion run --target debug "$<$>:-e${CMAKE_BUILD_TYPE}>"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
diff --git a/platformio.ini b/platformio.ini
index 6af92ac..02e9444 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -1,4 +1,4 @@
-;PlatformIO Project Configuration File
+; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
@@ -12,4 +12,3 @@
platform = espressif8266
board = esp07
framework = arduino
-
diff --git a/src/WifiManager.cpp b/src/WifiManager.cpp
index 5ad3fcf..d4c5ad4 100644
--- a/src/WifiManager.cpp
+++ b/src/WifiManager.cpp
@@ -5,14 +5,14 @@
#include "WifiManager.h"
void WifiManager::init() {
- Serial.print("Setting soft-AP ... ");
- boolean result = WiFi.softAP("ESPsoftAP_01", "pass-to-soft-AP");
+ Serial.print("Setting up Access Point");
+ boolean result = WiFi.softAP("PumpenSteuerung-Heiligenbrunner", "1qayxsw2");
if(result == true)
{
- Serial.println("Ready");
+ Serial.println("Wifi Ready");
}
else
{
- Serial.println("Failed!");
+ Serial.println("Wifi Setup failed!");
}
}
diff --git a/src/WifiManager.h b/src/WifiManager.h
index 3d10397..3d41930 100644
--- a/src/WifiManager.h
+++ b/src/WifiManager.h
@@ -8,6 +8,7 @@
#include
class WifiManager {
+public:
void init();
};
diff --git a/src/main.cpp b/src/main.cpp
index 6ae906c..0b0b613 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,15 +1,19 @@
#include
#include
+#include "WifiManager.h"
+
bool allow;
bool error = false;
+/** pin config */
static const uint8_t WasserSensorPin = 14;
static const uint8_t DruckSensorPin = 12;
static const uint8_t SchuetzPin = 13;
/** time config */
-static const int abschaltzeit = 1800; //sek
+//static const int abschaltzeit = 1800; //sek
+static const int abschaltzeit = 900; //sek
static const int maxpumpdauer = 600; //sek
Ticker tick;
@@ -143,6 +147,9 @@ void setup() {
Serial.println("startup sequence complete!\n");
digitalWrite(LED_BUILTIN, HIGH);
+
+ WifiManager mang = WifiManager();
+ mang.init();
}