Variables \ Learning \ 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:

This example is for Wiring version 0023+. 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.

Variables.
Variables are used for storing values. In this example, changing the values of variables 'a' and 'b' significantly change the light pattern.

    int a = 20;
    int b = 50;
    int c = a*8;
    int d = a*9;
    int e = b-a;
    int f = b*2;
    int g = f+e;

    void setup() {
      pinMode(48, OUTPUT);
    }

    void loop() {
      digitalWrite(48, HIGH);
      delay(a);
      digitalWrite(48, LOW);
      delay(b);
      digitalWrite(48, HIGH);
      delay(c);
      digitalWrite(48, LOW);
      delay(d);
      digitalWrite(48, HIGH);
      delay(e);
      digitalWrite(48, LOW);
      delay(f);
      digitalWrite(48, HIGH);
      delay(g);
    }