• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP 32 Flickering I/P

Q&A Forum › Category: ESP32 › ESP 32 Flickering I/P
1 Vote Up Vote Down
STEPHEN HIBBERT asked 1 year ago

i am monitoring a relay I/P which is flickering as utilty power is not stable in this area. i need to know when I/P is off for more the 2 mins. if I use delay(***) it slows program down. and works eratically
So what i need is a Off Delay, so if I dont see input for more then 2 mins my program then runs.
Here is code
https://pastebin.com/qx0162ss
thanks for any help

Question Tags: ESP32 Flickering Input
2 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Hi.
 
Instead of delay, you can use milis() to count the time without blocking your code.
If you’re new to this concept, I recommend taking a look at this tutorial: https://forum.arduino.cc/t/using-millis-for-timing-a-beginners-guide/483573
 
I hope this helps.
Regards.
Sara

0 Vote Up Vote Down
STEPHEN HIBBERT answered 1 year ago

thanks Sara, i will check out.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.