Skip to content

Instantly share code, notes, and snippets.

@aewallin
Last active February 5, 2018 15:34
Show Gist options
  • Save aewallin/69fe10517032678c5009b64c829bc62b to your computer and use it in GitHub Desktop.
Save aewallin/69fe10517032678c5009b64c829bc62b to your computer and use it in GitHub Desktop.
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