File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed 
build/shared/examples/02.Digital/Debounce Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 2121 by Limor Fried 
2222 modified 28 Dec 2012 
2323 by Mike Walters 
24+  modified 30 Aug 2016 
25+  by Arturo Guadalupi 
26+ 
2427
2528 This example code is in the public domain. 
2629
@@ -39,8 +42,8 @@ int lastButtonState = LOW;   // the previous reading from the input pin
3942
4043//  the following variables are long's because the time, measured in miliseconds,
4144//  will quickly become a bigger number than can be stored in an int.
42- long  lastDebounceTime = 0 ;  //  the last time the output pin was toggled
43- long  debounceDelay = 50 ;    //  the debounce time; increase if the output flickers
45+ unsigned   long  lastDebounceTime = 0 ;  //  the last time the output pin was toggled
46+ unsigned   long  debounceDelay = 50 ;    //  the debounce time; increase if the output flickers
4447
4548void  setup () {
4649  pinMode (buttonPin, INPUT);
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments