Skip to main content
25 events
when toggle format what by license comment
Nov 5, 2014 at 10:02 history tweeted twitter.com/#!/StackArduino/status/529936817315778560
S Nov 1, 2014 at 13:42 history edited jfpoilpret
updated tags to reflect the expanding nature of Q&A
S Nov 1, 2014 at 13:42 history suggested akellyirl
updated tags to reflect the expanding nature of Q&A
Nov 1, 2014 at 10:35 review Suggested edits
S Nov 1, 2014 at 13:42
Oct 31, 2014 at 19:07 history edited Merlin CC BY-SA 3.0
deleted 40 characters in body
Oct 31, 2014 at 19:05 vote accept Merlin
Oct 31, 2014 at 18:32 comment added Merlin @BrettM I put a delay of 2 sec at the end of the if. When I output button as a boolean, I get 0 until I press it, when, because of the delay, the output stops, then, I get a 1 and then it goes back to writing 0. So I think the button is reacting correctly.
Oct 31, 2014 at 18:14 comment added BrettFolkins change "button" to a boolean and the serial output will start making sense; with more understandable serial output how about putting a large delay in the loop (1s maybe?) and then looking at the output to see if button is reacting correctly.
Oct 31, 2014 at 17:10 history edited Merlin CC BY-SA 3.0
added 717 characters in body
Oct 31, 2014 at 16:32 answer added akellyirl timeline score: 1
Oct 31, 2014 at 15:11 history edited Merlin CC BY-SA 3.0
added 6 characters in body
Oct 31, 2014 at 15:09 comment added Merlin @Gerben See the comment above this one.
Oct 31, 2014 at 15:09 comment added Merlin @BrettM I already thought that this could be a problem, but as Gerben said, this would make the lamps turn on very fast. Right now, the lamps do not react at all.
Oct 31, 2014 at 14:20 comment added Gerben You might want to add a delay, or the leds will turn on, one after another, faster than your eyes can see.
Oct 31, 2014 at 5:49 answer added jfpoilpret timeline score: 2
Oct 31, 2014 at 3:19 comment added BrettFolkins The debouncing that you should be worried about is that your code loops so fast, even pressing the button for an instant activates the "button is pressed" code multiple times. you need to recognize when the button has turned from off to on, not just when it is pressed.
Oct 31, 2014 at 3:04 history edited Merlin CC BY-SA 3.0
added 131 characters in body; edited title
Oct 31, 2014 at 2:54 answer added Ignacio Vazquez-Abrams timeline score: 1
Oct 31, 2014 at 2:53 comment added Ignacio Vazquez-Abrams A MCU is a giant logic circuit.
Oct 31, 2014 at 2:52 comment added Merlin Okey, I edited the question: I don't even press the button before the failure happens. Also: "The effect is usually unimportant in power circuits, but causes problems in some analogue and logic circuits that respond fast enough to misinterpret the on‑off pulses as a data stream." and I am not using an analog input or output(I do use the analog pins, right, but with digitalWrite).
Oct 31, 2014 at 2:50 history edited Merlin CC BY-SA 3.0
added 47 characters in body
Oct 31, 2014 at 2:47 comment added Ignacio Vazquez-Abrams en.wikipedia.org/wiki/Switch#Contact_bounce
Oct 31, 2014 at 2:46 comment added Merlin Care to explain to me what you mean by debouncing? (And if it could be the cause of the problem.)
Oct 31, 2014 at 2:43 comment added Ignacio Vazquez-Abrams Other than the fact that you don't do any debouncing?
Oct 31, 2014 at 2:40 history asked Merlin CC BY-SA 3.0