randomSeed() \ 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 | ### randomSeed()
Examples |
    void setup()
    {
      Serial.begin(57600);
      randomSeed(20);
    }

    void loop()
    {
      int randNum = random(0, 500);
      Serial.println(randNum, 2);
      delay(500);
    }
Description | Sets the seed value for random(). By default, random() produces different results each time the program is run. Set the value parameter to a constant to return the same pseudo-random numbers each time the software is run.
Syntax |
    randomSeed(value);
Parameters |
value | int
Returns | None
Usage | Application
Related | random()

Updated on November 01, 2009 12:55:26pm PST