08-25-2016, 01:17 AM
Alright, the relay via GPIO project works, my python code attached at the bottom, one anomaly i noticed just now, whenever i power cycle or turn on the pine64 board, it triggers the relay, which is obviously a bad thing because my relay triggers the garage gate to open or close.
so then if power blips - my garage gate will open.
Any idea how to prevent GPIO blips on boot or on power on ?
my python code (no rocket science, and based on relay rpi lab):
import RPi.GPIO as GPIO ## Import GPIO library
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(15, GPIO.OUT)
GPIO.output(15,False)
time.sleep(4)
GPIO.output(15,True)
so then if power blips - my garage gate will open.
Any idea how to prevent GPIO blips on boot or on power on ?
my python code (no rocket science, and based on relay rpi lab):
import RPi.GPIO as GPIO ## Import GPIO library
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(15, GPIO.OUT)
GPIO.output(15,False)
time.sleep(4)
GPIO.output(15,True)