Commands that provide access to GPIO data and functions.
Get the current state of the instrument's channel
Command
Response
Command
{
"gpio": {
"1": [
{
"command":"getCurrentState"
}
]
}
}
Response
{
"gpio": {
"1": [
{
"command":"getCurrentState",
"statusCode": 0,
"wait":0,
"state": "idle",
"mode": "gpio",
"direction": "output",
"value": 1
}
]
}
}
Read the specified GPIO channel(s).
Command
Response
Command
{
"gpio":{
"1":[
{
"command":"read"
}
]
}
}
Response
{
"gpio":{
"1":[
{
"command":"read",
"statusCode":0,
"wait":100,
"direction: "input"
"value":1
}
]
}
}
Set the parameters (direction) of the specified GPIO channel(s).
Command
Response
Command
{
"gpio":{
"1":[
{
"command":"setParameters",
"direction":"input"
}
],
"2":[
{
"command":"setParameters",
"direction":"output"
}
]
}
}
Response
{
"gpio":{
"1":[
{
"command":"setParameters",
"statusCode":0,
"wait":100
}
],
"2":[
{
"command":"setParameters",
"statusCode":0,
"wait":100
}
]
}
}
Write the output voltage(s) of the specified GPIO channel(s).
Command
Response
Command
{
"gpio":{
"1":[
{
"command":"write",
"value":1
}
]
}
}
Response
{
"gpio":{
"1":[
{
"command":"write",
"statusCode":0,
"wait":500
}
]
}
}