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

digitalWrite()

Examples
import processing.serial.*; //Import the Serial i/o and the Wiring Libraries
import Wiring.*;
Wiring wiring; //Create a Wiring object
void setup() {
  println(Wiring.list()); //print the serial devices list
  //inicialized the wiring object
  wiring = new Wiring ( this, Wiring.list()[1], 57600); 		  
  wiring.pinMode(48,Wiring.OUTPUT); //sets the pinMode
}
void draw() {
  if (mousePressed) {
    wiring.digitalWrite(48,Wiring.HIGH);
  }
  else {
    wiring.digitalWrite(48,Wiring.LOW);
  }
}
Description The digitalWrite() method sets the value of a digital output pin. Possible values are HIGH or LOW.
Syntax
Wiring.digitalWrite(pin, value)
Parameters
pin int: pin number.
value HIGH or LOW.
Returns None
Usage Application
Updated on July 07, 2011 11:10:10pm PDT

Creative Commons License