Archived
1
0

Working automatic mode.No DB stuff yet.

This commit is contained in:
Shaun Setlock
2021-11-12 15:23:57 -05:00
parent dbbf6f7b42
commit 7bbdbc8998
4 changed files with 135 additions and 23 deletions

View File

@@ -14,16 +14,6 @@ def get_pin_input():
RELAY2_PIN = 20 # Unassigned
RELAY3_PIN = 21 # Lamp
# Setup the Inputs to use the internal pull-down.
GPIO.setup(PB1_BCM, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.setup(PB2_BCM, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.setup(PB3_BCM, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
# Setup the Outputs.
GPIO.setup(RELAY1_PIN, GPIO.OUT)
GPIO.setup(RELAY2_PIN, GPIO.OUT)
GPIO.setup(RELAY3_PIN, GPIO.OUT)
# Get current time.
now = datetime.now()
hour = now.hour