mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-05-19 10:32:56 +00:00
DMX-17 made data-files possible
This commit is contained in:
parent
ab1e60ba03
commit
6665df4cc6
2 changed files with 19 additions and 1 deletions
11
data/index.html
Normal file
11
data/index.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Test</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
Your advert could be placed here
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include "ESPDMX.h"
|
#include "ESPDMX.h"
|
||||||
#include <ESPAsyncWebServer.h>
|
#include <ESPAsyncWebServer.h>
|
||||||
|
#include <SPIFFS.h>
|
||||||
|
|
||||||
// WiFi stuff
|
// WiFi stuff
|
||||||
const char *ssid = "artnet";
|
const char *ssid = "artnet";
|
||||||
|
@ -90,11 +91,17 @@ void setup()
|
||||||
Serial.print(size);
|
Serial.print(size);
|
||||||
Serial.println(")");*/ });
|
Serial.println(")");*/ });
|
||||||
|
|
||||||
|
if (!SPIFFS.begin(true))
|
||||||
|
{
|
||||||
|
Serial.println("An Error has occurred while mounting SPIFFS");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request)
|
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request)
|
||||||
{
|
{
|
||||||
Serial.println("ESP32 Web Server: New request received:"); // for debugging
|
Serial.println("ESP32 Web Server: New request received:"); // for debugging
|
||||||
Serial.println("GET /"); // for debugging
|
Serial.println("GET /"); // for debugging
|
||||||
request->send(200, "text/html", "<html><body><h1>Hello, I'm a DMX-INTERFACE!</h1></body></html>"); });
|
request->send(SPIFFS, "/index.html"); });
|
||||||
|
|
||||||
server.begin();
|
server.begin();
|
||||||
Serial.println("Server started!");
|
Serial.println("Server started!");
|
||||||
|
|
Loading…
Add table
Reference in a new issue