mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-07-05 13:48:53 +00:00
added a basic html site
This commit is contained in:
parent
55348d19f5
commit
ab1e60ba03
1 changed files with 13 additions and 4 deletions
17
src/main.cpp
17
src/main.cpp
|
@ -1,10 +1,8 @@
|
||||||
// Art-Net DMX Interface Demo
|
|
||||||
// 2024-10-17 Patrick Schwarz
|
|
||||||
|
|
||||||
#include <ArtnetWiFi.h>
|
#include <ArtnetWiFi.h>
|
||||||
// #include <ArtnetEther.h>
|
// #include <ArtnetEther.h>
|
||||||
|
|
||||||
#include "ESPDMX.h"
|
#include "ESPDMX.h"
|
||||||
|
#include <ESPAsyncWebServer.h>
|
||||||
|
|
||||||
// WiFi stuff
|
// WiFi stuff
|
||||||
const char *ssid = "artnet";
|
const char *ssid = "artnet";
|
||||||
|
@ -13,6 +11,8 @@ const IPAddress ip(192, 168, 1, 201);
|
||||||
const IPAddress gateway(192, 168, 1, 1);
|
const IPAddress gateway(192, 168, 1, 1);
|
||||||
const IPAddress subnet(255, 255, 255, 0);
|
const IPAddress subnet(255, 255, 255, 0);
|
||||||
|
|
||||||
|
AsyncWebServer server(80);
|
||||||
|
|
||||||
// Art-Net stuff
|
// Art-Net stuff
|
||||||
ArtnetWiFi artnet;
|
ArtnetWiFi artnet;
|
||||||
// const String target_ip = "192.168.1.200";
|
// const String target_ip = "192.168.1.200";
|
||||||
|
@ -28,7 +28,7 @@ void setup()
|
||||||
{
|
{
|
||||||
|
|
||||||
// Serial console
|
// Serial console
|
||||||
// Serial.begin(115200);
|
Serial.begin(9600);
|
||||||
|
|
||||||
// WiFi stuff
|
// WiFi stuff
|
||||||
// WiFi.begin(ssid, pwd);
|
// WiFi.begin(ssid, pwd);
|
||||||
|
@ -89,6 +89,15 @@ void setup()
|
||||||
Serial.print(", size = ");
|
Serial.print(", size = ");
|
||||||
Serial.print(size);
|
Serial.print(size);
|
||||||
Serial.println(")");*/ });
|
Serial.println(")");*/ });
|
||||||
|
|
||||||
|
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request)
|
||||||
|
{
|
||||||
|
Serial.println("ESP32 Web Server: New request received:"); // for debugging
|
||||||
|
Serial.println("GET /"); // for debugging
|
||||||
|
request->send(200, "text/html", "<html><body><h1>Hello, I'm a DMX-INTERFACE!</h1></body></html>"); });
|
||||||
|
|
||||||
|
server.begin();
|
||||||
|
Serial.println("Server started!");
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue