-1

After I call the following Java code:

gpio.shutdown()

The GPIO turns off. How can I restart it?

I need to restart it because of this problem. In the problem the light does not turn off with led.low() so I plan to turn it off by turning off the GPIO to turn off the light.

After I shutdown the GPIO when I call provisionDigitalOutputPin a second time to start the LED, it works.

Then I try to shutdown the GPIO again and it doesn't work.

How can I shutdown the GPIO multiple times in my program?

I am using a Raspberry Pi 3 Model B.

  • 1
    My best guess is that you have wired up the LED wrong. The end result is you are now trying to solve a silly problem. You would be best off showing one or more clear photos of your wiring. We could then address the real problem. – joan Sep 1 '18 at 14:55
  • @joan The led does light up when I call provisionDigitalOutputPin so it is connected. – The Old Man and the C Sep 1 '18 at 15:49
  • 2
    If you want real help you need to provide photos of your wiring. We do not know what you have done wrong - but you have done something wrong. – joan Sep 1 '18 at 16:49
  • you need to solve the because of this problem ... i added a comment to that post – jsotola Sep 1 '18 at 19:33
0

For what it's worth - when I run into a software snag during development I just use hardware "/reset" (RPi labels the header differently) or software "reboot".

Little drastic, but gets me back to coding in known state.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.