Timeline for Arduino stops loop randomly whenever a button is pressed
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 3, 2018 at 2:57 | comment | added | Luke Lozowski | I have exactly the same problem. My friend just advised me to install the diode, as this apparently fixed his problem. We are working on the project from a couple of days and we wasted around 3 days, purely because of that. I have 20 lines of code, as everything was stopping working, as soon as we connect more devices. It like just stops working and it is broken and then suddenly become back to life. Yeah. We know what is going on. I may post the update about this diode once I install it on my rig. | |
Feb 22, 2017 at 0:11 | vote | accept | Daniel | ||
Feb 17, 2017 at 20:43 | answer | added | dannyf | timeline score: 0 | |
Feb 17, 2017 at 19:52 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Jan 18, 2017 at 19:29 | answer | added | atland | timeline score: 2 | |
Jan 16, 2017 at 14:13 | comment | added | Daniel | jfpoilpret: Yes, I can confirm that the last line printed is definitely the last line. It is not reprinted. Also, I can confirm the 10 ohm resister exists between my button and the input pin, and that the opposite button side is connected to GND. The wiring probably isn't a problem because if I use a different code with the same wiring to do other similar behaviors, it still works. | |
Jan 14, 2017 at 19:28 | comment | added | Andre Courchesne | Add debouncing for your mechanical button. Your probably false detecting button press and release caused by bouncing. arduino.cc/en/Tutorial/Debounce | |
Jan 14, 2017 at 16:58 | comment | added | jfpoilpret |
For your inputs you use INPUT mode not INPUT_PULLUP , this means you added yourself a pullup or pulldown resistor "between" your button and the input pin, can you confirm this wiring? And then the opposite button side is connected to GND (if you use a pullup resistor) or +5V (if you use a pulldown resistor). A bad wiring here could make your program fail unexpectedly.
|
|
Jan 14, 2017 at 16:56 | comment | added | jfpoilpret | You claim "the void loop() function stops", then you say "or 78005 as the last line printed". Can you really confirm this is the last line printed ONCE then nothing, or the last line reprinted forever, which would be much different than "the loop() stops" then. | |
Jan 14, 2017 at 15:07 | comment | added | Majenko | How is the button wired? | |
Jan 14, 2017 at 14:43 | review | First posts | |||
Jan 14, 2017 at 15:44 | |||||
Jan 14, 2017 at 14:42 | history | asked | Daniel | CC BY-SA 3.0 |