Timeline for How can I add an On-Off switch to my Raspberry Pi 2
Current License: CC BY-SA 3.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 31, 2015 at 23:43 | comment | added | SlySven | Yeah it keeps running a sleep(30) in a loop I thought but now I am not so sure - as for python I hardly know my Asp from my Elbow so I'm not the best to rely on here... I recognise that the event detection is outside of any loop - it wouldn't be much good if you have to hold the button for up to 30 seconds before anything happened. | |
Dec 31, 2015 at 23:34 | comment | added | user29510 |
Looking at the code the sleep(30) instruction is only there to prevent quitting the script at once. It doesn't seem to wait 30 seconds between detections. Event detection is immediate otherwise you'd need to keep the button pressed for 30 seconds. Anyway I'm still confused as I'd have expected an infinite loop.
|
|
Dec 31, 2015 at 23:12 | history | answered | SlySven | CC BY-SA 3.0 |