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?
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.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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?
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.