user10960: I have an Arduino sketch where I'm sending commands over serial, and as a result turning pins from low to high. What I'm looking to do is have those pins turn high for 5 seconds and then turn back to low. I was looking for a time or scheduling library for Arduino that allows multiple timers at once and lets you pass a parameter (at least I think that's what I need).
In other words, I would like to implement a "doAfter" method and pass the function it is calling a pin number.

user10961: Have you tried the delay() function? Try putting this in the loop() function for pin 3.
digitalWrite(3, HIGH);
delay(1000); // time in milliseconds as parameter
digitalWrite(3, LOW);


10960: <p>I have an Arduino sketch where I'm sending commands over serial, and as a result turning pins from low to high. What I'm looking to do is have those pins turn high for 5 seconds and then turn back to low. I was looking for a time or scheduling library for Arduino that allows multiple timers at once and lets you pass a parameter (at least I think that's what I need).</p>

<p>In other words, I would like to implement a "doAfter" method and pass the function it is calling a pin number.</p>
 10961: <p>Have you tried the <code>delay()</code> function? Try putting this in the <code>loop()</code> function for pin 3.</p>

<pre><code>digitalWrite(3, HIGH);
delay(1000); // time in milliseconds as parameter
digitalWrite(3, LOW);
</code></pre>
