Created
July 23, 2019 06:29
-
-
Save unixbigot/6b71c9ceccbedfb2e3dd9b422d7826c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time, datetime, calendar | |
from pytz import timezone | |
import requests, json | |
import RPi.GPIO as GPIO | |
Relay_Ch1 = 21 | |
Relay_Ch2 = 26 | |
Relay_Ch3 = 19 | |
Relay_Ch4 = 13 | |
GPIO.setwarnings(False) | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(Relay_Ch1,GPIO.OUT) | |
GPIO.setup(Relay_Ch2,GPIO.OUT) | |
GPIO.setup(Relay_Ch3,GPIO.OUT) | |
GPIO.setup(Relay_Ch4,GPIO.OUT) | |
GPIO.output(Relay_Ch1,GPIO.HIGH) | |
GPIO.output(Relay_Ch2,GPIO.HIGH) | |
GPIO.output(Relay_Ch3,GPIO.HIGH) | |
GPIO.output(Relay_Ch4,GPIO.HIGH) | |
GPIO.output(Relay_Ch1,GPIO.LOW) | |
time.sleep(3) | |
GPIO.output(Relay_Ch1,GPIO.HIGH) | |
time.sleep(2) | |
GPIO.output(Relay_Ch1,GPIO.LOW) | |
time.sleep(2) | |
GPIO.output(Relay_Ch2,GPIO.LOW) | |
time.sleep(2) | |
GPIO.output(Relay_Ch3,GPIO.LOW) | |
time.sleep(2) | |
GPIO.output(Relay_Ch4,GPIO.LOW) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment