Few weeks back I posted a tutorial on millis function where I was using this function to multitask, process slice in Arduino Code.
In this Tutorial I am showing you how to create delayed trigger mechanism.
I use it to build the eggtimer but it can be used in the veriaty of projects
The full tutorial can be found here:
If you like this content and you want to support me in creating similar videos go to my Patreon webpagehttps://www.patreon.com/MariosIdeasOrhttps://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7PD67JWZ9S3EJ&source=url
EXPANDED TECHNICAL DETAILS
Precise Non-Blocking Countdown
This project provides a robust kitchen or laboratory timer that avoids the pitfalls of the delay() function, allowing for multiple concurrent tasks.
- Temporal Differential Logic: The countdown is managed using the
millis()function. The Arduino calculates the difference between the "Target Time" and "Current Time" on every loop, ensuring the timer remains frame-perfect even if other sensors are being read. - Rotary Encoder Navigation: Uses a robust rotary encoder for time setting. The Arduino IDE 2.0 Beta was used to implement a "Smooth Scrolling" algorithm; as the user turns the knob faster, the time increments in larger steps (1m vs. 15m).
Alerts
- Dynamic Alarm Frequency: Once the timer hits zero, the Arduino triggers a 90dB piezo siren that ramps up in frequency, ensuring the user hears it from across the house.