Last active
February 5, 2018 15:34
-
-
Save aewallin/69fe10517032678c5009b64c829bc62b 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 requests | |
import time | |
import syslog | |
""" | |
Simple program for testing Ethernet control of: | |
Mini-Circuits RC-2SP6T-S12 | |
""" | |
ip ="192.168.100.30" | |
def state(switch="A", state=1): | |
syslog.syslog("MUX %s %d" % (switch, state)) | |
r = requests.get("http://%s/SP6T%s:STATE:%d" % (ip, switch, state)) | |
if __name__=="main": | |
state("B", 2) | |
time.sleep(5) | |
state("B", 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment