I'm trying to get a simple LED script running as a first example of how to access and use the gpio pins.
import time import RPi.GPIO as GPIO print("Start") gpioPin = 37 GPIO.setmode(GPIO.BCM) print("Step 1") GPIO.setup(gpioPin, GPIO.OUT) # Script crashes here print("Step 2") GPIO.output(gpioPin, GPIO.HIGH) print("Step 3") time.sleep(10) GPIO.output(gpioPin, GPIO.LOW) print("Step 4") GPIO.cleanup() print("End")
But the whole system gets unresponsive after
GPIO.setup(gpioPin, GPIO.OUT). The output I get is
after that, I can't do anything except pull the power cable and reboot the pi. The system is unresponsive. Access through ssh doesn't work anymore. Even ping responses don't work anymore after GPIO.setup().
I'm running Raspbian Jessie on a RPi 3 Model B with Python 3.4.
The problem is similar to RPi.GPIO mysteriously crashing when setting up pin except that I am not using ubuntu. I'm using the lastest raspberry pi image of rabian.
What can I do to prevent this? What is the problem here? Any idea?