Language \ Environment \ Comparison
 
Index
 
  The Processing 1.0 _ALPHA_ Reference is a work in progress.
If you see any errors or have any comments, please write to: reas at groupc.net
Name  

serial

   
Examples  
int val; 
 
void setup() { 
  beginSerial(); 
} 
 
void loop() { 
  // Set the background to the value in val 
  background(val);  
} 
 
void serialEvent() { 
  // Initializes the variable val with the 
  // last value readed by the serial port 
  val = serial;	  
} 

Description   Always contains the most recent data that has been written to the port.
   
Syntax  
serial
   
Parameters  
 

   
Returns   None
   
Usage   Application
   
Related   beginSerial()
endSerial()
serialWrite()
serialEvent()
   
© 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas