All submissions

Single Double Click and Long Press Detection

Solving Approach

How do you plan to solve it?

 
 

 

 

 

Code

/*Paste your code here*/

 

int pushButton = 2;

int LED = 7;


 

void setup() {

  pinMode(pushButton, INPUT_PULLUP);

  pinMode(LED, OUTPUT);

}


 

void loop() {

  int buttonState = digitalRead(pushButton);

  digitalWrite(LED, !buttonState);

  delay(1);

}

 

Output

Video

Add a video of the output (know more)

 

 

 

 

Submit Your Solution

Note: Once submitted, your solution goes public, helping others learn from your approach!