delay() \ Language (API) \ Wiring ALPHA 1.0
Author: Hernando Barragán
Description: Wiring is an electronic sketchbook and hardware electronics for developing ideas. It is a context for learning fundamentals of computer programming and prototyping with electronics within the context of the electronic arts.
Keywords: Wiring, Processing, Interactive Media, Electronic Arts, Programming, C, C++, Hernando Barragán

Search wiring.org.co:

Reference for Wiring version 0023+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.

Name | ### delay()
Examples |
    int pin = 0;
    int ledpin = 1;

    void setup() {
      pinMode(pin, INPUT);
      pinMode(ledpin, OUTPUT);
    }
    void loop() {
      if(pin == HIGH) {
        digitalWrite(ledpin, HIGH);
      } else {
        digitalWrite(ledpin, LOW);
      }
      delay(250);  // Stops the program for 250 milliseconds
    }
Description | Forces the program to stop running for a specified time. Delay time are specified in thousandths of a second. The function call delay(3000) will stop the program for three seconds.
Syntax |
    delay(milliseconds)
Parameters |
milliseconds | int: specified as milliseconds (there are 1000 milliseconds in 1 second)
Returns | None
Usage | Application
Related | delayMicroseconds()

Updated on November 01, 2009 11:41:54pm PST