{
  "patches": {
    "@/main": {
      "nodes": {
        "BkyacxM59": {
          "id": "BkyacxM59",
          "type": "@/analog-write-resolution",
          "position": {
            "x": -2,
            "y": 1,
            "units": "slots"
          },
          "boundLiterals": {
            "r1t0WeGq5": "10"
          }
        }
      },
      "path": "@/main"
    },
    "@/analog-write-resolution": {
      "nodes": {
        "r1t0WeGq5": {
          "id": "r1t0WeGq5",
          "type": "xod/patch-nodes/input-number",
          "position": {
            "x": 0,
            "y": 0,
            "units": "slots"
          },
          "label": "BITS",
          "description": "8,10,12,14,16 bits, depending on hardware"
        },
        "SyAfGlM95": {
          "id": "SyAfGlM95",
          "type": "xod/patch-nodes/not-implemented-in-xod",
          "position": {
            "x": 0,
            "y": 1,
            "units": "slots"
          }
        },
        "HyoPMlfc5": {
          "id": "HyoPMlfc5",
          "type": "xod/patch-nodes/output-pulse",
          "position": {
            "x": 0,
            "y": 2,
            "units": "slots"
          },
          "label": "READY",
          "description": "To signal that the change has been made.\nError if board doesn't support analogWriteResolution()"
        }
      },
      "path": "@/analog-write-resolution",
      "attachments": [
        {
          "filename": "patch.cpp",
          "encoding": "utf-8",
          "content": "\n\nnode {\n    //#include <Arduino.h>\n    void evaluate(Context ctx) {\n        Number bits = getValue<input_BITS>(ctx);\n        #ifdef ARDUINO_ARCH_SAMD\n        analogWriteResolution(bits);\n        emitValue<output_READY>(ctx, true);\n        #else\n        raiseError<output_READY>(Context ctx)\n        #endif\n    }\n}\n"
        }
      ]
    }
  },
  "name": "analog-to-1024"
}
