Hello I'm Trying to do something like the signal below, but all the code that I have found
uses the same ON time for the OFF time using mills, What I have not found is a reference or code to handle them independently.
It's very easy to do it with the delay function, but I need to run something else, While the leds do this.
Not very experienced on this on using loops or while's yet, but anything goes.
//Activate LED's ON and OFF at independent time ONtime ? OFFtime.
//Start With LED1 and then LED2..
//Without USING DELAY..
int led1on= 500 // means that led1 will turn on 500ms
int led1off= 200 // means that led1 will turn Off 200ms
Int led2on= 400 // means that led1 will turn on 500ms
Int Led2off= 200 // means that led1 will turn on 500ms
FIRST CYCLE |SECOND CYCLE|
| |
__________ | |__________
| | | | |
| | | | |
LED1 | ||| |
ON OFF | |
500 200 | |
| |
| |
________ | ________
| | | | |
LED2 _________________| ||_________| |
ON OFF
400 200
|
CYCLE STARTS AGAIN