Examples

Python usage examples

Python /stats

Example:

import requests   

resp = requests.get("http://nexus.local/api/io/0.0.1/3/input/values", auth=("", ""))
if resp.status_code == requests.codes.ok:
	response = resp.json()
	for pin in response['pins']:
		print(pin)

Output:

{'id': 1, 'voltage': 0}
{'id': 2, 'voltage': 0}
{'id': 3, 'voltage': 0}
{'id': 4, 'voltage': 0}
{'id': 5, 'voltage': 0}
{'id': 6, 'voltage': 0}

Last modified September 1, 2021