Hi there. Trying to figure out the correct code to blink multiple leds but with differing pulse widths. For instance, I would like send HIGH signal to led1 & led2 at the same time, but leave led1 on for 10ms and led2 on for 20ms. I don't have an oscilloscope otherwise I think I could probably figure this out. It seems the following will turn them on at the same time, but then how to I assign different delays to each?
digitalWrite (led1, HIGH); // turn on led1
digitalWrite (led2, HIGH); // turn on led 2
If I immediately follow this with
delay (10);
it will apply to both leds, correct?
Ultimately, I would like to, at time=0, turn on led1 & led2. At time = 10ms, turn led1 off (LOW). At time = 20ms, turn led2 off. And finally turn them on again at time = 30 ms.
Thanks for the help