Wifi first settings

This commit is contained in:
lukas-heiligenbrunner 2020-04-10 14:44:18 +02:00
parent b17fbd5ca6
commit 56b7aa1426
3 changed files with 34 additions and 2 deletions

18
src/WifiManager.cpp Normal file
View File

@ -0,0 +1,18 @@
//
// Created by lukas on 10.04.20.
//
#include "WifiManager.h"
void WifiManager::init() {
Serial.print("Setting soft-AP ... ");
boolean result = WiFi.softAP("ESPsoftAP_01", "pass-to-soft-AP");
if(result == true)
{
Serial.println("Ready");
}
else
{
Serial.println("Failed!");
}
}

13
src/WifiManager.h Normal file
View File

@ -0,0 +1,13 @@
//
// Created by lukas on 10.04.20.
//
#pragma once
#include <Arduino.h>
#include <ESP8266WiFi.h>
class WifiManager {
void init();
};

View File

@ -113,6 +113,9 @@ ICACHE_RAM_ATTR void WasserSensorInt() {
}
void setup() {
digitalWrite(SchuetzPin, LOW); //pumpe anfangs sofort abschalten
pinMode(SchuetzPin, OUTPUT);
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, LOW);
@ -120,8 +123,6 @@ void setup() {
pinMode(WasserSensorPin, INPUT);
pinMode(DruckSensorPin, INPUT);
digitalWrite(SchuetzPin, LOW); //pumpe anfangs sofort abschalten
pinMode(SchuetzPin, OUTPUT);
Serial.begin(9600);
Serial.println("\n\n\n\nstartup of ESP");