 
 #if ARDUINOJSON_VERSION_MAJOR == 5
 //#pragma message("Compiling for ArduinoJson v5")
-void json2patterns(const char* json) {
+bool json2patterns(const char* json) {
   DynamicJsonBuffer jsonBuffer(2000);
   JsonObject& deviceJson = jsonBuffer.parseObject(json);
   if (deviceJson.success()) {

    String data = server.arg("plain");
    Serial.println(data);

    json2patterns(data.c_str());
    if (numPatterns > 0) {
      ws2812fx.stop();
      ws2812fx.clear();
      ws2812fx.resetSegments();

#include <EEPROM.h>
#include <ArduinoOTA.h>

#define VERSION "2.0.8"

uint8_t  dataPin = D1; // default digital pin used to drive the LED strip
uint16_t numLeds = 30; // default number of LEDs on the strip
