Blink without delay, can add web control on/off feature?

Hi, I have below blinking LED strip work fine, can anyone share it's integrate with web control on and off the blink.

#include <FastLED.h>

#define NUM_LEDS 300
#define BRIGHTNESS  255
#define LED_TYPE    WS2812
#define DATA_PIN 5

CRGB leds[NUM_LEDS];
unsigned long actTime = 0;
unsigned long remTime = 0;
const unsigned long period = 1000;


void setup() {
  FastLED.setMaxPowerInVoltsAndMilliamps(5, 1000);
  FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
  FastLED.setBrightness(BRIGHTNESS);
}

bool is_red = false;

void loop() {
  actTime = millis();
  if (actTime - remTime >= period) {
    remTime = actTime;
    if (!is_red) {
      is_red = true;
      fill_solid(leds, NUM_LEDS, CRGB::Red);
      FastLED.show();
    } else {
      is_red = false;
      fill_solid(leds, NUM_LEDS, CRGB::Black);
      FastLED.show();
    }
  }
}

Which Arduino???

What processor? What internet connection on it?

I am using esp8266

「aarg via Arduino Forum <notifications@arduino.discoursemail.com>」在 2022年11月3日 週四,22:20 寫道:

What IoT suite do you want to use? There are hundreds of them. Or, do you want a very basic web interface? The ESP8266 Arduino library has web example sketches you can look at.

My objective is web control on button (blink led just like my example) and off button to turn it off.
Without any delay, so use millis.
May you please share if any.

「aarg via Arduino Forum <notifications@arduino.discoursemail.com>」在 2022年11月3日 週四,22:36 寫道:

Have you looked at the ESP web example sketches?

Yes i tried.

What was the result?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.