I am new to Arduino and wanted to teach myself some principles by building a little project to simulate the lights on marine Cardinal Marker buoys, here is a link to what it should look like:
As you can see it is just 4 flashing LED’s. Three of the lights follow a 15 second pattern while one, the EAST marker repeats every 10 seconds.
I have written a very basic code using DELAY to write to each LED. It is very inelegant and means that ALL the lights follow a 15 second pattern which is wrong.
I quickly realised I should not use delay and perhaps an array and millis function is the way to go.
I have tried to take chunks of other peoples examples to make this work but do not understand enough to get the LEDs to flash a certain number of times before repeating. I think perhaps I need the counter function.
I have used this to write a short code for each light in isolation and this works but I cant work out how to get them all to start together and flash in sync.
I would be grateful if someone could show me the correct code that I could pick apart to understand the logic. It is frustrating because I think this should be very basic and short!