while{} and millis()

Hi,

How can I use millis() in while function? I would like to power-on led only one time. Delay is working but millis is not. How can I manage it?

Br,

while(sayac < 1 ) {
digitalWrite(2, HIGH);
delay(5000);
digitalWrite(2, LOW);
delay(5000);
sayac++;
}

You wouldn’t.
You’d use a simple “if”

gureken:
Delay is working but millis is not.

That code does not use millis(). Show us how you are using millis() and we will show you what is wrong with it.

Also your code is...
a) Incomplete - post complete sketches or we cannot help.
b) Not posted inside [​code][​/code] tags - read the posting guidelines sticky.

Look at the "BlinkWithoutDelay" example in the Arduino IDE (File->Examples->Digital), it does what you want.