Can millis be used for Outputs

Hello

Can i use millis as an Output? i have to count 24 impulses and after that i have to produce an output where i can change the switch-off time? for example switch-off time 5 ms

You started a topic in the Uncategorised category of the forum

Your topic has been moved to a relevant category. Please be careful in future when deciding where to start new topics

You can't use millis() and an output. That makes no sense

You can, however, use millis() to time how long an output stays in a particular state.

Save the value of millis() when the output is set to the required value, monitor the value of millis() whilst the output is in that state and when the current value of millis(0 - start value of millis() equals or exceeds the required period, change the state of the output.

The value of the period can, of course, be changed

you don't say what the timing of the "pulses" need to be? what is the frequency. And it sounds like you want some output to be HIGH (on?) and then LOW (off) after the 24th pulse as it continues

if the frequency is 1kHz, one pulse every msec, then the output would be on for 19 msec and off for 5 msec