Language \ Environment \ Libraries \ Comparison  
   
Back  
   
  Reference for Processing (BETA) version 88+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.  
Class   Gainer
   
Name  

setLow()

   
Examples  
// Example   output digital port 
 
import processing.gainer.*;

Gainer gainer;
void setup(){
  gainer = new Gainer(this);
}

void draw(){
  background(0);
  if(mousePressed){
    if(mouseButton==LEFT)
      gainer.digitalOutput(0x00);
     if(mouseButton==RIGHT)
      gainer.digitalOutput(0xff);

     mousePressed = false;
  }
    
}
void keyPressed()
{
  if(key == '1'){
    gainer.setHigh(1);
  }
  if(key == 'q'){
    gainer.setLow(1);    
  }
  if(key == '2'){
    //this is slow.
    gainer.setHigh(0);
    gainer.setHigh(1);
    gainer.setHigh(2);
    gainer.setHigh(3);
  }
  if(key == 'w'){
    //this is slow.
   gainer.setLow(0);
   gainer.setLow(1);
   gainer.setLow(2);
   gainer.setLow(3);
  }
  if(key == '3'){
    //this is faster than setHigh() and setLow() 
     boolean b[] = {true,false,true,false};
     gainer.digitalOutput(b);
     
  }
  if(key == 'e'){
    //this is faster than setHigh() and setLow() 
     boolean b[] = {false,true,false,true};
     gainer.digitalOutput(b);
     
  }
  if(key == '4'){
      //this is faster than setHigh() and setLow() 
      int p[] = {0,1,3};
      gainer.setHigh(p);
  }
  if(key == 'r'){
    //this is faster than high() and low() 
    int p[] = {0,1,3};
     gainer.setLow(p);
  }
    

}




 

Description   It makes +5V on digital output port. command "D*" "H*" "L*"
   
Syntax  
gainer.setLow(port)
gainer.setLow(portArray)
   
Parameters  
gainer   any variable of type Gainer

port   int: number of the digital output port

portArray   int[]: number of the digital output ports

   
Returns   void
   
Usage   Application
   
 
 






   
 
Updated:??
 
 








Creative Commons License
 
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info