Comments (5)
switching them to something like this?
http://www.thearduinomakerman.info/blog/2016/4/8/tutorial-delay-vs-timer
from esp8266-fastled-webserver.
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.
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.
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.
Closing due to >1 year inactivity.
from esp8266-fastled-webserver.
Related Issues (20)
- map.cpp - Fix regression for "up" direction, as used by clocks HOT 3
- Chamaeleon64: Angles -- narrowing conversion of type warnings
- Re-work how UI-exposed properties work HOT 4
- Support for stable effects / palettes configuration HOT 3
- Partial web interface HOT 14
- Enable use of gradient palettes as a normal palette HOT 1
- Stop using fake EEPROM, store settings as JSON in file system
- wrong repo - ignore
- running Pacifica HOT 2
- Sounds great, doesn't work HOT 4
- Not Found: / HOT 6
- Querying /all and /fieldsWithoutOptions endpoints freezes animation HOT 1
- macro "SERIAL_DEBUG_ADDF" defined here HOT 1
- default.h file: no such file HOT 4
- Running in AP mode? HOT 4
- Does this project work with NodeMCU board? HOT 1
- unable to compile in arduino ide 1.8.16 or 2.0.4 HOT 5
- FastLED and Webserver crashlooping HOT 1
- Compiling on latest PlatformIO HOT 4
- Compilation erro in platformio caused by data_pin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp8266-fastled-webserver.