mirror of
https://gitlab.com/zwirbel/illucat.git
synced 2025-12-14 17:35:22 +01:00
run pattern ater startup
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"ircServer": "chat.freenode.net",
|
||||
"ircPort": 6665,
|
||||
"ircNickname": "redcat",
|
||||
"ircUser": "redcat"
|
||||
"ircNickname": "biermeter",
|
||||
"ircUser": "biermeter"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"mqttClientName" : "illucat",
|
||||
"mqttClientName" : "biermeter",
|
||||
"mqttBrokerHost" : "192.168.1.2",
|
||||
"mqttBrokerPort" : 1883,
|
||||
"mqttRootTopic" : "wirelos/led/illucat"
|
||||
"mqttRootTopic" : "wirelos/led/biermeter"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"pin": 4,
|
||||
"length": 8,
|
||||
"length": 60,
|
||||
"brightness": 127,
|
||||
"updateInterval": 100,
|
||||
"defaultColor": 100
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <WebApiPlugin.h>
|
||||
#include <PixelPlugin.h>
|
||||
#include <MqttPlugin.h>
|
||||
#include <OtaTcpPlugin.cpp>
|
||||
|
||||
WiFiNet *network;
|
||||
Sprocket *sprocket;
|
||||
@@ -16,6 +17,7 @@ WebConfigPlugin *webConfigPlugin;
|
||||
WebApiPlugin *webApiPlugin;
|
||||
PixelPlugin *pixelPlugin;
|
||||
MqttPlugin *mqttPlugin;
|
||||
OtaTcpPlugin *otaTcp;
|
||||
|
||||
void setup()
|
||||
{
|
||||
@@ -25,10 +27,12 @@ void setup()
|
||||
webServerPlugin = new WebServerPlugin({WEB_CONTEXT_PATH, WEB_DOC_ROOT, WEB_DEFAULT_FILE, WEB_PORT});
|
||||
webConfigPlugin = new WebConfigPlugin(webServerPlugin->server);
|
||||
webApiPlugin = new WebApiPlugin(webServerPlugin->server);
|
||||
otaTcp = new OtaTcpPlugin({OTA_PORT, OTA_PASSWORD});
|
||||
sprocket->addPlugin(pixelPlugin);
|
||||
sprocket->addPlugin(webServerPlugin);
|
||||
sprocket->addPlugin(webConfigPlugin);
|
||||
sprocket->addPlugin(webApiPlugin);
|
||||
sprocket->addPlugin(otaTcp);
|
||||
sprocket->addPlugin(mqttPlugin);
|
||||
|
||||
network = new WiFiNet(
|
||||
@@ -45,6 +49,7 @@ void setup()
|
||||
webServerPlugin->server->serveStatic(MQTT_CONFIG_FILE, SPIFFS, "mqttConfig.json");
|
||||
|
||||
sprocket->activate();
|
||||
sprocket->publish("pixels/pattern", "1");
|
||||
}
|
||||
|
||||
void loop()
|
||||
|
||||
Reference in New Issue
Block a user