Timeline for Press On Hold Off Power Switch
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 30, 2019 at 23:19 | vote | accept | David Boswell | ||
Dec 30, 2019 at 21:04 | answer | added | VE7JRO | timeline score: 0 | |
Dec 30, 2019 at 20:18 | comment | added | David Boswell | Hi JRobert after spending the best part of 2 days looking around the web. Reading posts looking at you tube videos. I cant find an example to do this. The Arduino IDE as a button on, off, example in it. But I need a long press to turn off. To prevent accidental power off. Basically I want a pin to go high on a short press. and only go low if it sees a long press of say 5 secs. So if the button is pressed accidentally it will do nothing unless the press is long. | |
Dec 30, 2019 at 20:06 | answer | added | juliussin | timeline score: 0 | |
Dec 30, 2019 at 17:43 | comment | added | JRobert | What have you tried so far, and what part is giving you difficulty? If you need a hint to get started, you code will need to store the relay state (on/off), measure the time of each button-press, and compare the time to the length of a short-press or long-press, depending on the current state. | |
Dec 30, 2019 at 15:45 | review | First posts | |||
Dec 30, 2019 at 16:45 | |||||
Dec 30, 2019 at 15:43 | history | asked | David Boswell | CC BY-SA 4.0 |