• Firmware 1v79

    I have a noisy button on B5.

    The default debounce setting (10ms) per setWatch() docs doesn't seem to do anything. When I add debounce: 20 (or any value), it prevents the callback from getting any args. Code below.

    Recommendations?

    var button=B5;
    pinMode(button, 'input_pulldown');
    function buttonPressed(info) {
            console.log(info);  // [ undefined ]
            info.time;   // Uncaught Error: Field or method "time" does not already exist, and can't create it on undefined
    }
    setWatch(buttonPressed,button,
             {repeat:true,debounce:200});
    
    
About

Avatar for RandyHarmon @RandyHarmon started