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

servoWrite()

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); 
}
void draw() {
  wiring.servoWrite(0, mouseX);
}
Description Allows the manipulation of a servo motor. Note: To control a servo motor you don't need to defined the state of the pin using the pinMode method.
Syntax
Wiring.pinMode(pin, value)
Parameters
pin The number of the digital pin
value The value of the position of the servo motor
Returns None
Usage Application
Updated on July 07, 2011 11:10:11pm PDT

Creative Commons License