 const String CONST_TYPE = "01";     // the id of press button
 
 // ######## DEF ########
-#define LONGPRESS_LEN    25         // Min nr of loops for a long press
+#define LONGPRESS_LEN    40         // Min nr of loops for a long press
 #define DELAY            20        // Delay per loop in ms
 
 // ######## VAR ########

    digitalWrite(LED_PIN, HIGH);
    Serial.println(CONST_ID+":"+CONST_TYPE+":1");
}
// turn LED Off:
void turnOff(){
    digitalWrite(LED_PIN, LOW);

// ####### Function ########
int handle_button(){
    int event;
    int button_now_pressed = !digitalRead(BUTTON_PIN); // pin low -> pressed

    if (!button_now_pressed && button_was_pressed) {
        if (button_pressed_counter < LONGPRESS_LEN)
            event = EV_SHORTPRESS;
        else
            event = EV_LONGPRESS;
    }
    else
        event = EV_NONE;

    if (button_now_pressed)
        ++button_pressed_counter;
    else 
        button_pressed_counter = 0; 
        
    button_was_pressed = button_now_pressed;
    return event;
}
