@Marc, is your strange phenomenon still well and alive? Could you share your demo() function?
@GeekBot, what does your volt meter say when the Button is pressed? From your code - pinMode(...,"input_pullup") - I conclude that the button - when pressed - connects pin B10 to GND - correct?
What kind of button do you have? What's the cleanness of the contacts? No insult here, but buttons come with all kinds of behavior. For the debounce, 5ms is a bit short, most people use 50..100ms.
Sometimes it is just some electro-mechanical issue... lousy breadboard connectivity...
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.
@Marc, is your strange phenomenon still well and alive? Could you share your
demo()
function?@GeekBot, what does your volt meter say when the Button is pressed? From your code -
pinMode(...,"input_pullup")
- I conclude that the button - when pressed - connects pin B10 to GND - correct?What kind of button do you have? What's the cleanness of the contacts? No insult here, but buttons come with all kinds of behavior. For the debounce, 5ms is a bit short, most people use 50..100ms.
Sometimes it is just some electro-mechanical issue... lousy breadboard connectivity...