Created
June 4, 2021 19:47
-
-
Save prcutler/41735752fec77d0c84b3622db9b27ddf 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 board | |
import digitalio | |
import time | |
import adafruit_requests as requests | |
from adafruit_circuitplayground import cp | |
led = digitalio.DigitalInOut(board.LED) | |
led.direction = digitalio.Direction.OUTPUT | |
mute_on_button = digitalio.DigitalInOut(board.D4) | |
mute_off_button = digitalio.DigitalInOut(board.D5) | |
mute_on = "http://192.168.1.212:8080/goform/formiPhoneAppDirect.xml?Z2MUON" | |
mute_off = "http://192.168.1.212:8080/goform/formiPhoneAppDirect.xml?Z2MUOFF" | |
while True: | |
led.value = True | |
time.sleep(0.5) | |
led.value = False | |
time.sleep(0.5) | |
if mute_on_button: | |
requests.get(mute_on) | |
elif mute_off_button: | |
requests.get(mute_off) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment