Giter VIP home page Giter VIP logo

Comments (5)

hunttolby avatar hunttolby commented on August 27, 2024 1

switching them to something like this?

http://www.thearduinomakerman.info/blog/2016/4/8/tutorial-delay-vs-timer

from esp8266-fastled-webserver.

jasoncoon avatar jasoncoon commented on August 27, 2024

I find it fairly simple. Just add a new function that draws one frame, without using any delays, like rainbow(), sinelon(), etc. Then add that function to the patterns array, along with its name.

Looking at the code for those effects, the biggest problem will likely be replacing all of the delays used with elapsed millis timers. If your effect function uses delays, the ESP8266 webserver can't respond to requests.

from esp8266-fastled-webserver.

hunttolby avatar hunttolby commented on August 27, 2024

I guess i am just stuck on how to use it as a speed delay like in this source code from the led strip effects.

void theaterChase(byte red, byte green, byte blue) {
  elapsedMillis timeElapsed;
  for (int j=0; j<10; j++) {  //do 10 cycles of chasing
    for (int q=0; q < 3; q++) {
      for (int i=0; i < NUM_LEDS; i=i+3) {
        setPixel(i+q, red, green, blue);    //turn every third pixel on
      }
      showStrip();
     //this is where i am stuck and where the delay is originally as a "speed" delay
      if(timeElapsed > 50) {
        
        timeElapsed = 0
      }
     
      for (int i=0; i < NUM_LEDS; i=i+3) {
        setPixel(i+q, 0,0,0);        //turn every third pixel off
      }
    }
  }
}

sorry for bothering very new to arduino but thanks for the help already!

from esp8266-fastled-webserver.

Tecky10 avatar Tecky10 commented on August 27, 2024

Hi, did you manage it? I would do the same with the "theaterChaseRainbow" from this Side: https://www.tweaking4all.com/hardware/arduino/adruino-led-strip-effects/#LEDStripEffectTheatreChaseRainbow

from esp8266-fastled-webserver.

henrygab avatar henrygab commented on August 27, 2024

Closing due to >1 year inactivity.

from esp8266-fastled-webserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.