Skip to main content
20 events
when toggle format what by license comment
May 13, 2019 at 2:15 vote accept hanlok
May 13, 2019 at 2:10 vote accept hanlok
May 13, 2019 at 2:14
May 13, 2019 at 0:12 answer added hanlok timeline score: 0
May 12, 2019 at 18:03 comment added goldilocks @hanlok Please understand that literally asking other people to write code for you ("is there a better way to write this script that will work") is kind of a non-starter. Based on the errors other people have pointed out, you need to get down to basics; if you don't understand those you will just have one error after another.
May 11, 2019 at 0:13 comment added Milliways The answer may have indicated your immediate problem, but the code listed still has code errors, logic errors and will actually do nothing. I suggest you look at GPIO Zero which has helpful tutorials.
May 10, 2019 at 23:30 comment added Ghanima The final exit(sys.exit) is not only superfluous but also a strange combination of two things. See here. It should be exit() or sys.exit() with the parameter being the error code if you intend to send one to the caller.
May 10, 2019 at 23:30 comment added Ghanima I still wonder that any of this works. signal.signal(signal.sigint, GPIO) is certainly not what you intend it to be. What is signal, resv_level_pin, GPIO.in, pull_up_down = GPIO.PUD_up = 18 supposed to mean? Your function definition lacks the parentheses, the parameters (if any) and the colon. It is furthermore never called. if and elif lack the colon too and the indentation is off after if. Where there is the elif an else should suffice. True and False keywords should start uppercase.
May 10, 2019 at 21:55 vote accept hanlok
May 13, 2019 at 2:10
May 10, 2019 at 16:52 answer added user96931 timeline score: 0
May 10, 2019 at 16:41 history edited goldilocks CC BY-SA 4.0
added 32 characters in body
May 10, 2019 at 16:41 history reopened goldilocks
May 10, 2019 at 16:33 history edited hanlok CC BY-SA 4.0
added debug info
May 10, 2019 at 15:38 history edited hanlok CC BY-SA 4.0
clarifying the help needed.
May 10, 2019 at 15:25 review Reopen votes
May 10, 2019 at 16:19
May 10, 2019 at 15:13 history edited hanlok CC BY-SA 4.0
edited title
May 10, 2019 at 15:05 history edited hanlok CC BY-SA 4.0
update on script help
May 10, 2019 at 14:53 history closed goldilocks Needs details or clarity
May 10, 2019 at 14:51 history edited goldilocks CC BY-SA 4.0
added 84 characters in body
May 10, 2019 at 14:40 review First posts
May 10, 2019 at 14:55
May 10, 2019 at 14:38 history asked hanlok CC BY-SA 4.0