Wifi first settings
This commit is contained in:
parent
b17fbd5ca6
commit
56b7aa1426
18
src/WifiManager.cpp
Normal file
18
src/WifiManager.cpp
Normal 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
13
src/WifiManager.h
Normal file
@ -0,0 +1,13 @@
|
||||
//
|
||||
// Created by lukas on 10.04.20.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <ESP8266WiFi.h>
|
||||
|
||||
class WifiManager {
|
||||
void init();
|
||||
|
||||
};
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user