Updating sample scripts to use final pin assignments.
This commit is contained in:
@@ -16,14 +16,21 @@ if __name__ == "__main__":
|
||||
# Setup the output pin; initialize OFF.
|
||||
GPIO.setup(RELAY1_PIN, GPIO.OUT)
|
||||
GPIO.output(RELAY1_PIN, False)
|
||||
GPIO.setup(RELAY2_PIN, GPIO.OUT)
|
||||
GPIO.output(RELAY2_PIN, False)
|
||||
GPIO.setup(RELAY3_PIN, GPIO.OUT)
|
||||
GPIO.output(RELAY3_PIN, False)
|
||||
|
||||
|
||||
# Short toggle.
|
||||
i = 0
|
||||
try:
|
||||
time.sleep(1.0)
|
||||
time.sleep(10.0)
|
||||
GPIO.output(RELAY1_PIN, True)
|
||||
time.sleep(2.0)
|
||||
GPIO.output(RELAY3_PIN, True)
|
||||
time.sleep(60.0)
|
||||
GPIO.output(RELAY1_PIN, False)
|
||||
GPIO.output(RELAY3_PIN, False)
|
||||
time.sleep(1.0)
|
||||
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user