Led blinking, simple?

Hello
Well what i want to do is a multi tasking with arduino.
I want to blink some diodes for example LED on pin 13 500msON 350msOFF 480msON 880msOFF

I have this code here

class Flasher
{
// Class Member Variables
// These are initialized at startup
int ledPin; // the number of the LED pin
long OnTime; // milliseconds of on-time
long OffTime; // milliseconds of off-time

// These maintain the current state
int ledState; // ledState used to set the LED
unsigned long previousMillis; // will store last time LED was updated

// Constructor - creates a Flasher
// and initializes the member variables and state
public:
Flasher(int pin, long on, long off)
{
ledPin = pin;
pinMode(ledPin, OUTPUT);

OnTime = on;
OffTime = off;

ledState = LOW;
previousMillis = 0;
}

void Update()
{
// check to see if it's time to change the state of the LED
unsigned long currentMillis = millis();

if((ledState == HIGH) && (currentMillis - previousMillis >= OnTime))
{
ledState = LOW; // Turn it off
previousMillis = currentMillis; // Remember the time
digitalWrite(ledPin, ledState); // Update the actual LED
}
else if ((ledState == LOW) && (currentMillis - previousMillis >= OffTime))
{
ledState = HIGH; // turn it on
previousMillis = currentMillis; // Remember the time
digitalWrite(ledPin, ledState); // Update the actual LED
}
}
};

Flasher led1(12, 100, 400);
Flasher led2(13, 350, 350);

void setup()
{
}

void loop()
{
led1.Update();
led2.Update();
}

It works ok with ON and OFF time,
I need help from some professional to help me a bit with ON OFF ON OFF ON OFF different timing settings.
Regards
Milan

If you want to use a program that is already written, see my multiblink sketch in my library site (link below). The blink patterns are defined in a data table and used by the program to do whatever you need from timing, on/off and fade in/out.

Milan151:
I need help from some professional to help me a bit with ON OFF ON OFF ON OFF different timing settings.

Hi, can you explain a bit more what you want to do next. What do you mean by "different timing settings"?

Also please always use code tags when you post a sketch. It is the </> icon. Please amend your first post to try it out. It should look likethis.

Paul

marco_c:
If you want to use a program that is already written, see my multiblink sketch in my library site (link below). The blink patterns are defined in a data table and used by the program to do whatever you need from timing, on/off and fade in/out.

Marco, i have visit your website and download your software, its superb! It fixed my issues.
Thanks a lot man!
Cheers
Milan

PaulRB:
Hi, can you explain a bit more what you want to do next. What do you mean by "different timing settings"?

Also please always use code tags when you post a sketch. It is the </> icon. Please amend your first post to try it out. It should look likethis.

Paul

Thanks Paul
I have try to insert code but didnt know how to do it, at least now i know how to do it.
Thanks a lot!
Regards
Milan