Sine and Cosine

This example is for Wiring version 1.0 build 0100+. If you have a previous version, use the examples included with your software. If you see any errors or have comments, please let us know.

Random.

Each time the program is loaded the result is different.

int num;

void setup()
{
  Serial.begin(9600);
  randomSeed(200);
}

void loop()
{
  num = random(255);  // generate a random number between 0 and 255
  Serial.println(num, DEC);
  delay(30);
}