Skip to content

Instantly share code, notes, and snippets.

@aewallin
Created February 20, 2018 13:59
Show Gist options
  • Save aewallin/88e902d782bb148d9933b2d2b724cb30 to your computer and use it in GitHub Desktop.
Save aewallin/88e902d782bb148d9933b2d2b724cb30 to your computer and use it in GitHub Desktop.
Arduino-controlled RF-multiplexer test code
# AW2018-02-20
# For testing RF-multiplexer (Arduino Due+ETH-shield)
import requests
import time
import syslog
#ip="192.168.1.177"
ip="192.168.3.30"
def state(mux="A",state=1):
r = requests.get("http://%s/SP8T:%s:STATE:%d"%(ip, mux, state))
if __name__=="__main__":
t0 = time.time()
for s in range(9):
state("B",s)
state("A",s)
delta = time.time()-t0
state("B",0)
state("A",0)
print delta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment