millis()

millis()

Tells you how much time has gone by since the Arduino was last turned on, or reset.

Returns

It returns the number of milliseconds that have passed since the Arduino was last turned on, or reset. The number it returns is a long. It can't count past 50 days, so it resets to 0 after about that much time.

Example

// Turns on the LED 5 seconds after Arduino is reset if ( millis() > 5000 ) { awesome.LED.turnOn(); }

Tips

The millis() function lets you add timing to your project, without using delay().

x

Hi awesome backer,

Thanks again for supporting us on Kickstarter or Indiegogo.

On this website you can access the learning videos and documentation. You'll need to sign up for an account but it shouldn't take long and allows us to remember your video progress so you don't have to keep track of that.

We hope you have a great time learning with Awesome Shield.


Close Message