Search wiring.org.co:

Libraries \ FirmataProcessing

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

Class | Wiring
Name |

### pinMode()

Examples |
    //Import the Serial i/o and the Wiring Libraries
    import processing.serial.*;
    import Wiring.*;
    //Create a Wiring object
    Wiring wiring;
    void setup() {
      //print the serial devices list
      println(Wiring.list());
      //inicialized the wiring object
      wiring = new Wiring ( this, Wiring.list()[1], 57600);
      //sets the pinMode
      wiring.pinMode(48, Wiring.OUTPUT);
    }
    void draw() {
      .........
    }
Description | The method pinMode() set a pin as INPUT or OUTPUT. A digital I/O pin could have two possible values: HIGH o LOW. It is possible to write or read the value from a digital I/O pin using th methods digitalWrite() and digitalRead().
Syntax |
    Wiring.pinMode(pin, modo)
Parameters |

pin | The number of the pin
modo | The mode of the digital pin. The modes could be set as Wiring.OUTPUT or Wiring.INPUT

Returns | None
Usage | Application

Updated on July 07, 2011 11:10:10pm PDT