wifi working
This commit is contained in:
parent
161352f0ca
commit
d6057525f7
@ -9,20 +9,21 @@
|
|||||||
#define _TASK_STATUS_REQUEST // Compile with support for StatusRequest functionality - triggering tasks on status change events in addition to time only
|
#define _TASK_STATUS_REQUEST // Compile with support for StatusRequest functionality - triggering tasks on status change events in addition to time only
|
||||||
|
|
||||||
// #define ENABLE_MQTT
|
// #define ENABLE_MQTT
|
||||||
// #define ENABLE_WIFI
|
#define ENABLE_WIFI
|
||||||
// #define ENABLE_FS
|
// #define ENABLE_FS
|
||||||
// #define ENABLE_PINFINDER
|
// #define ENABLE_PINFINDER
|
||||||
|
#define ENABLE_COLORS
|
||||||
|
|
||||||
// #include <TaskScheduler.h>
|
// #include <TaskScheduler.h>
|
||||||
|
|
||||||
#ifdef ENABLE_MQTT
|
|
||||||
#include "MQTT.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ENABLE_WIFI
|
#ifdef ENABLE_WIFI
|
||||||
#include "Wifi.h"
|
#include "Wifi.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_MQTT
|
||||||
|
#include "MQTT.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_FS
|
#ifdef ENABLE_FS
|
||||||
#include "FS.h"
|
#include "FS.h"
|
||||||
#include <LittleFS.h>
|
#include <LittleFS.h>
|
||||||
@ -33,17 +34,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void feedWatchdog(){
|
#ifdef ENABLE_COLORS
|
||||||
// ESP.wdtFeed();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool blinkStatus = false;
|
|
||||||
void blink(){
|
|
||||||
blinkStatus = !blinkStatus;
|
|
||||||
digitalWrite(LED_BUILTIN, blinkStatus);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef INCLUDE_LED
|
|
||||||
CRGB colorTable[] = {
|
CRGB colorTable[] = {
|
||||||
CRGB::Red,
|
CRGB::Red,
|
||||||
CRGB::Blue,
|
CRGB::Blue,
|
||||||
@ -178,15 +169,12 @@ void loop() {
|
|||||||
PinFinder_loop();
|
PinFinder_loop();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef INCLUDE_LED
|
#ifdef ENABLE_COLORS
|
||||||
colors();
|
colors();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
delay(1000);
|
delay(1000);
|
||||||
|
|
||||||
return;
|
|
||||||
|
|
||||||
sleep(2000);
|
|
||||||
|
|
||||||
// Led_loop();
|
// Led_loop();
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,6 @@
|
|||||||
#ifdef ENABLE_WIFI
|
|
||||||
|
|
||||||
#include <ESP8266WiFi.h>
|
|
||||||
|
|
||||||
#include <ESPAsync_WiFiManager.h>
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
|
#include <WiFi.h>
|
||||||
#include "WifiSettings.h"
|
#include "WifiSettings.h"
|
||||||
|
|
||||||
|
|
||||||
@ -26,6 +22,7 @@ void Wifi_setup_softap(){
|
|||||||
|
|
||||||
void Wifi_setup(){
|
void Wifi_setup(){
|
||||||
|
|
||||||
|
Serial.println("Wifi_setup()");
|
||||||
WiFi.mode(WIFI_STA);
|
WiFi.mode(WIFI_STA);
|
||||||
//TODO:
|
//TODO:
|
||||||
WiFi.begin(WIFI_ESSID, WIFI_PASSWORD);
|
WiFi.begin(WIFI_ESSID, WIFI_PASSWORD);
|
||||||
@ -41,5 +38,3 @@ void Wifi_setup(){
|
|||||||
Serial.println(WiFi.localIP());
|
Serial.println(WiFi.localIP());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
Loading…
x
Reference in New Issue
Block a user