Blinky Help

When the button is pressed for the first time, the LEDs turn on and off in 2seconds, lights up for 2seconds, pause means red, white, blue in the loop.
When you press the button a second time, the LEDs turn on and off in 1seconds, light up 0.5 seconds, pausing white, red, and blue in the loop.
For the third pressure, everything is switched off, pressing again turns on the 1st case.
Please help me how to program this.
Thank you!

Please help me how to program this.

Why is this your homework?

What do these actually mean:

  • "the LEDs"
  • "turn on and off in 2seconds"
  • "pause means red, white, blue in the loop" and "pausing white, red, and blue in the loop."

It's 10 minutes work to code this, once the instructions make sense.

finola_marsaili:
It's 10 minutes work to code this, once the instructions make sense.

But even then (hopefully) no one is going to do it for you unless you first make an effort yourself.
Sorry, but no one ever learnt a thing that way around.

Start with some of the tutorials in the sticky...
Useful links - check here for reference posts / tutorials

You should at least start with the Blink Without Delay example, which you will almost certainly need for this project.

pcbbc:
But even then (hopefully) no one is going to do it for you unless you first make an effort yourself.
Sorry, but no one ever learnt a thing that way around.

But OP needs to elaborate on what this:

gokuzmaj:
Please help me

...actually means. S/he didn't say there was any learning planned or required, and if I feel the urge to write a working sketch (I do, but can't since the the requirements are unclear) I'll do so and it's not down to you to say if I may or not.

You are right, no one can stop you. And knock yourself out if that’s what you want to do. I’m sure you’ll have no shortage of work coming your way.

I'll do so and it's not down to you to say if I may or not.

Correct but the ethos built up in this forum from long time members over the years is that doing some one's homework for them is not a good thing to do. This is because many of us consider this to be the student cheating and this not only cheats the system but also cheats all the other students who actually bothered to learn something and do the work. Ultimately it does not help the student either because he is denied a learning opportunity.

This is quite clearly an assignment you can tell. It is a seemingly random sequence of things to do. There is no rational given as to why these things need to be done in that order. It has three parts, a common trait in educational assignments, and the student understands so little about his assignment he is unable to describe what he actually wants to do.

We post this or a link to this at the start of each forum section:-
How to use this Forum

This says in one section:-

Also - don't claim you are an engineer or some other high-falutin' title, and then go and ask questions that make us wonder what box of cracker jacks you got your degree from. We can see through that a mile away; we also don't like doing other people's homework for them, and we see those kinds of questions often as well at certain periodic moments (on this and other electronics forums we are on - we all have seen it, we know when the waves are about to start with people asking for homework help - we don't mind honest questions toward understanding, but we don't like being conned into doing someone's homework).

So someone might report you to a moderator for breaking the forum rules, which could result in a warning, temporary ban or permanent exclusion.