I'm pretty new to C++, and I am trying to get my head around functions.
I know about the blink without delay, and using millis() to do timing while doing other things. The disadvantage of this is that I have to keep checking when the required time has passed.
It should be possible to write a function, say ledOn(500), that would turn on an led for 500mS, and then I just forget about it. I'm thinking interrupts come into it somewhere, but I just can't quite figure it out. Any help would be greatly appreciated.