I am fairly new to Arduino and want to code some LEDs to flash and look like police lights. I can code the front and back lights to flash simultaneously, but I can't figure out how to make them flash in different patterns/times, or how to make the top lights(light bar), flash at a different rate/pattern than the others. I looked around and from what I found I concluded that more than one loop is not possible, and I can't wrap my head around how variables work (subtracting/adding to the variables, and resetting it back to zero when it reaches the desired number (1000).
I know what I want it to do, but I don't know how to put it into code:
A = 0(base number)
B = 1(amount added each second)
C = variable (number of seconds)
when C = 10 switch from pattern #1 to pattern #2
(sorry if it did not make much sense, I am not the best at explaining things)
(P.S. I am using a MEGA 2560, if that helps)