Index
 
  The Wiring 1.0 _ALPHA_ Reference is a work in progress.
If you see any errors or have any comments, please write to: hbarragan [at] uniandes.edu.co
Name  

write()

   
Examples  
#include <Encoder.h> 
 
boolean firstTime = true; 
Encoder myEncoder; 
 
void setup() { 
  myEncoder.attach(2, 8); 
} 
 
void loop() { 
  // Set the encoder's postion to 0 
  if(firsttime == true) { 
    myEncoder.write(0); 
    firstTime = false; 
  } 
} 

Description   The write() method sets the the encoder position, it can be used to initialize it, or reset it.
   
Syntax  
encoder.write(value)
   
Parameters  
value   int

encoder   The Encoder variable

   
Returns   None
   
Usage   Application