• Hi,

    I've run getPinMode() for each pin, and the return was "input" for all off them.

    There's no external resistor attached to the buttons. Is this needed?
    What resistor do I need in case of falling and rising? and if I use "rising", do I need to have the BAT connected to the button, or the GND?
    Do I need to use pinMode(B1, 'input_pullup'); in combination with a external registor?

    ={ free: 1608, usage: 632, total: 2240, history: 43,
    gc: 0, gctime: 5.47504425048, "stackEndAddress": 536909532, flash_start: 134217728, "flash_binary_end": 237920,
    "flash_code_start": 134459392, flash_length: 262144 }

    The setWatch is on the right-hand side of WebIDE, as part of my program.
    There are 8 setWatch in my program. If I put a "//" in front of the line where setWatch is, and leave only one (or 2 or 3) it works. So each setWatch and the associated function works fine.
    The problem occurs only if I set all the setWatch active.

    If I run the program, at the start I see that the value's are rising on the screen, witch means that the inputs are "active".. ? and the functions are called.
    After a while it is more stable, bu when I press a button, it looks like there are several functions called, because the values are changing on the screen.

    I've tried 25-50 as debounce, but then the values are rising faster. Therefore 1000.


Avatar for PeterD @PeterD started