StatementsComments \ 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 0024+. 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.

Statements and Comments.
Statements are the elements that make up programs. The ";" (semi-colon) symbol is used to end statements. It is called the "statement terminator." Comments are used for making notes to help people better understand programs. A comment begins with two forward slashes ("//").

    // The pinMode function is a statement that tells the Wiring board
    // to set a pin as INPUT or OUTPUT.
    // Each function statement has zero or more parameters.
    // Parameters are data passed into the function
    // and used as values for specifying what the hardware will do.

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

    // The digitalWrite function is a statement that tells the hardware
    // which value to set a pin, HIGH or LOW

    void loop() {
      // nothing for loop()
    }