Answers for "arduino falling edge"

C++
0

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;
}
Posted by: Guest on May-01-2020

Browse Popular Code Answers by Language