osmosis311 wrote:
Is there any way to get the GPIO pins not to be high when the system boots? How do others get around this issue?
I do autostart with python script.
1. Do DESKTOP script (i name it MyPiAutostart.desktop) with this code into it and put this desktop file into /home/pi/.config/autostart folder:
[Desktop Entry]
Type=Application
Name=MyPiAutostart
Exec=sudo python2 /home/pi/myFolder/checkAndSetGPIO.py # with path you have and yours filename
StartupNotify=false
2. Python script checkAndSetGPIO.py contains:
#!/usr/bin/python
import RPi.GPIO as GPIO
import time
pin1 = 17
GPIO.setmode(GPIO.BCM) # choose BCM or BOARD
GPIO.setwarnings(False)
GPIO.setup(pin1, GPIO.OUT) # set a port/pin as an output
GPIO.output(pin1, GPIO.LOW) # set port/pin value to 1/GPIO.HIGH/True in your case
#time.sleep(0.3) # sleep for 'n' seconds
and that is all. Now, on reboot it will check and set pin gpio 17.
Faramon