Kaynağa Gözat

Device Discovery (mDSN/NDS) added

!!!RELEASE CANDITATE!!!
master
gituser 2 hafta önce
ebeveyn
işleme
422e8ae064
5 değiştirilmiş dosya ile 29 ekleme ve 2 silme
  1. 8
    1
      .cproject
  2. 5
    0
      .project
  3. 5
    0
      .settings/org.eclipse.cdt.core.prefs
  4. 9
    0
      LEDLamp.ino
  5. 2
    1
      sloeber.ino.cpp

+ 8
- 1
.cproject Dosyayı Görüntüle

@@ -31,6 +31,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LEDLamp/libraries/Adafruit_NeoPixel}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LEDLamp/libraries/NTPClient}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LEDLamp/libraries/arduino_time-master}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LEDLamp/libraries/ESP8266mDNS/src}&quot;"/>
</option>
<inputType id="io.sloeber.compiler.cpp.sketch.input.1770649762" name="CPP source files" superClass="io.sloeber.compiler.cpp.sketch.input"/>
</tool>
@@ -48,6 +49,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LEDLamp/libraries/Adafruit_NeoPixel}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LEDLamp/libraries/NTPClient}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LEDLamp/libraries/arduino_time-master}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LEDLamp/libraries/ESP8266mDNS/src}&quot;"/>
</option>
<inputType id="io.sloeber.compiler.c.sketch.input.1705705" name="C Source Files" superClass="io.sloeber.compiler.c.sketch.input"/>
</tool>
@@ -65,6 +67,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LEDLamp/libraries/Adafruit_NeoPixel}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LEDLamp/libraries/NTPClient}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LEDLamp/libraries/arduino_time-master}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LEDLamp/libraries/ESP8266mDNS/src}&quot;"/>
</option>
<inputType id="io.sloeber.compiler.S.sketch.input.1190005390" name="Assembly source files" superClass="io.sloeber.compiler.S.sketch.input"/>
</tool>
@@ -119,7 +122,11 @@
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</storageModule>
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Release">
<resource resourceType="PROJECT" workspacePath="/LEDLamp"/>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cproject>

+ 5
- 0
.project Dosyayı Görüntüle

@@ -71,6 +71,11 @@
<type>2</type>
<locationURI>ECLIPSE_HOME/arduinoPlugin/packages/esp8266/hardware/esp8266/3.1.2/libraries/ESP8266WiFi</locationURI>
</link>
<link>
<name>libraries/ESP8266mDNS</name>
<type>2</type>
<locationURI>ECLIPSE_HOME/arduinoPlugin/packages/esp8266/hardware/esp8266/3.1.2/libraries/ESP8266mDNS</locationURI>
</link>
<link>
<name>libraries/Hash</name>
<type>2</type>

+ 5
- 0
.settings/org.eclipse.cdt.core.prefs Dosyayı Görüntüle

@@ -4,3 +4,8 @@ doxygen/doxygen_use_javadoc_tags=true
doxygen/doxygen_use_pre_tag=false
doxygen/doxygen_use_structural_commands=false
eclipse.preferences.version=1
environment/project/io.sloeber.core.sketch.0/ARDUINO_BOARD_ID/delimiter=;
environment/project/io.sloeber.core.sketch.0/ARDUINO_BOARD_ID/operation=append
environment/project/io.sloeber.core.sketch.0/ARDUINO_BOARD_ID/value=ESP8266
environment/project/io.sloeber.core.sketch.0/append=true
environment/project/io.sloeber.core.sketch.0/appendContributed=true

+ 9
- 0
LEDLamp.ino Dosyayı Görüntüle

@@ -1,6 +1,7 @@
#include "Arduino.h"
#include <ESP8266WebServer.h>
#include <WebSocketsServer.h>
#include <ESP8266mDNS.h>
#include <EEPROM.h>
#include <DNSServer.h>
#include <ArduinoJson.h>
@@ -256,6 +257,7 @@ void handleAPMode() {
void handleSTAMode() {
webServer.handleClient();
webSocket.loop();
MDNS.update();

static uint32_t lastNtpCheck = 0;

@@ -308,6 +310,13 @@ void startSTAWebServer() {
Serial.print("WebSocket: ws://");
Serial.print(WiFi.localIP());
Serial.println(":81/");

if (MDNS.begin("LEDLamp")) {
Serial.println("mDNS gestartet");
MDNS.addService("http", "tcp", 80);
MDNS.addService("ws", "tcp", 81);
MDNS.addService("LEDLamp", "tcp", 80);
}
}

void driveLEDStrip() {

+ 2
- 1
sloeber.ino.cpp Dosyayı Görüntüle

@@ -2,12 +2,13 @@
//This is a automatic generated file
//Please do not modify this file
//If you touch this file your change will be overwritten during the next build
//This file has been generated on 2026-07-14 11:48:58
//This file has been generated on 2026-07-16 22:35:32

#include "Arduino.h"
#include "Arduino.h"
#include <ESP8266WebServer.h>
#include <WebSocketsServer.h>
#include <ESP8266mDNS.h>
#include <EEPROM.h>
#include <DNSServer.h>
#include <ArduinoJson.h>

Loading…
İptal
Kaydet