formatting changes
comments wifi manager
This commit is contained in:
		@@ -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!");
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -8,6 +8,7 @@
 | 
			
		||||
#include <ESP8266WiFi.h>
 | 
			
		||||
 | 
			
		||||
class WifiManager {
 | 
			
		||||
public:
 | 
			
		||||
    void init();
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -1,15 +1,19 @@
 | 
			
		||||
#include <Arduino.h>
 | 
			
		||||
#include <Ticker.h>
 | 
			
		||||
 | 
			
		||||
#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();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user