I want to make a duty cycle of 2 LEDs using Arduino in tinkercad. I have 2 LEDs 1 is red and another is green. I want both the LEDs on at the same time but a glowing delay of red led is 1second and green led is 1.3second just like the graph below and having both duty cycle 50%.
but I cant be able to do that I had tried with 2 blocks of if-else but it doesn't work due to its take if-else synchronously then I tried to calculate the graph and want to put it as a delay but it is not an easy solution
I've learned about millis() is the solution but how would I use it? Please help me to solve this problem
Try this code: