Skip to content

Bridge 1.1 API - GPIO Commands

See #set-bus-voltage.

  • Command Request:

    {
    "transaction_id": "1",
    "command": "gpio_config_pin",
    "params": {
    "pinNumber": "<1..6>",
    "functionality": "<DIN|DOUT>"
    }
    }
  • Responses:

    • Immediate Promise Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": true,
      "data": {
      "command": "gpio_config_pin"
      }
      }
    • Final Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": false,
      "data": {
      "is_response_to": "gpio_config_pin",
      "status": "success"
      }
      }
  • Command Request:

    {
    "transaction_id": "1",
    "command": "gpio_digital_read",
    "params": {
    "pinNumber": "1..6"
    }
    }
  • Responses:

    • Immediate Promise Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": true,
      "data": {
      "command": "gpio_digital_read"
      }
      }
    • Final Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": false,
      "data": {
      "is_response_to": "gpio_digital_read",
      "status": "success",
      "logic_level": "<LOW|HIGH>"
      }
      }
  • Command Request:

    {
    "transaction_id": "1",
    "command": "gpio_digital_write",
    "params": {
    "pinNumber": "<1..6>",
    "logicLevel": "<0|1>"
    }
    }
  • Responses:

    • Immediate Promise Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": true,
      "data": {
      "command": "gpio_digital_write"
      }
      }
    • Final Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": false,
      "data": {
      "is_response_to": "gpio_digital_write",
      "status": "success"
      }
      }
  • Command Request:

    {
    "transaction_id": "1",
    "command": "gpio_set_interrupt",
    "params": {
    "pinNumber": "<1..6>",
    "edgeTrigger": "<RISING|FALLING|BOTH>"
    }
    }
  • Responses:

    • Immediate Promise Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": true,
      "data": {
      "command": "gpio_set_interrupt"
      }
      }
    • Final Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": false,
      "data": {
      "is_response_to": "gpio_set_interrupt",
      "status": "success"
      }
      }
{
"transaction_id": "0",
"status": "success",
"type": "notification",
"is_promise": false,
"data": {
"payload": {
"pin": "<1..6>"
}
}
}