From d5681bb06fa15dd6e86f1d32c0c784b5a0700b57 Mon Sep 17 00:00:00 2001 From: Aircoookie Date: Sun, 25 Feb 2018 16:43:32 +0100 Subject: [PATCH] Updated Add own functionality (markdown) --- Add-own-functionality.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Add-own-functionality.md b/Add-own-functionality.md index 923887e..daacd3d 100644 --- a/Add-own-functionality.md +++ b/Add-own-functionality.md @@ -27,8 +27,8 @@ After updating the color, you must call the `colorUpdated(int)` method. If you w ### Timing If you'd just like a simple modification that requires timing (like sending a request every 2 seconds), please **never** use the `delay()` function in your `userLoop()`! It will block everything else and WLED will become unresponsive and effects won't work! Instead, try this instead: -``` -long lastTime; +```cpp +long lastTime = 0; int delayMs = 2000; //we want to do something every 2 seconds void userLoop()