Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

arduino falling edge

int button = 2;
int flag;
int readbutton;
void setup(){}
void loop(){
  readbutton = digitalRead(button);
  if(readbutton>flag){
  //your code here
  flag=readbutton;
}
if(readbutton==0){
flag=0;
}
 
PREVIOUS NEXT
Tagged: #arduino #falling #edge
ADD COMMENT
Topic
Name
3+6 =