I want to write a program that can operate 2 gpio pins with different ON-OFF times at same time.
Say the time duration is 2 sec. In this time duration, I want to set GPIO 4 HIGH for 1 sec and LOW for 1 sec. And in that 2-sec same duration, I want to set GPIO 5 HIGH for 0.5 sec and LOW for 1.5 sec. I am not getting the logic on how to do this.