{"id":26668,"library":"xod-arduino","title":"XOD Arduino Transpiler","description":"Transpiles XOD projects into Arduino C++ code. Version 0.37.0 is the current stable release. Part of the XOD visual programming ecosystem, this package provides the core compilation pipeline: given a XOD project and an entry patch, it generates Arduino sketch code. Differentiators: tight integration with XOD's node-based paradigm, support for multiple Arduino boards, and optimized code generation for embedded targets. Release cadence is tied to XOD's overall release schedule.","status":"active","version":"0.37.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install xod-arduino","lang":"bash","label":"npm"},{"cmd":"yarn add xod-arduino","lang":"bash","label":"yarn"},{"cmd":"pnpm add xod-arduino","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Provides project and node types used in transpilation.","package":"xod-project","optional":false},{"reason":"Utility functions for functional programming patterns used in the codebase.","package":"xod-func-tools","optional":false}],"imports":[{"note":"Default export, ESM-only. No named export.","wrong":"const transpileForArduino = require('xod-arduino')","symbol":"transpileForArduino","correct":"import transpileForArduino from 'xod-arduino'"},{"note":"This is a default export, not a named export.","wrong":"import { transpileForArduino } from 'xod-arduino'","symbol":"transpileForArduino","correct":"import transpileForArduino from 'xod-arduino'"},{"note":"Named export for sketch-level transpilation.","wrong":"const transpileSketch = require('xod-arduino').transpileSketch","symbol":"transpileSketch","correct":"import { transpileSketch } from 'xod-arduino'"}],"quickstart":{"code":"import transpileForArduino from 'xod-arduino';\nimport { loadProject } from 'xod-project';\n\nconst project = loadProject('/path/to/project.xod');\nconst code = transpileForArduino(project, '@/main');\nconsole.log(code);","lang":"javascript","description":"Transpile a XOD project to Arduino C++ code using the default entry point."},"warnings":[{"fix":"Ensure entryPointPath follows the exact patch path syntax, e.g. '@/main'.","message":"The second argument 'entryPointPath' must be a string starting with '@/' indicating a patch path in the project. Incorrect paths cause runtime errors.","severity":"gotcha","affected_versions":">=0.30.0"},{"fix":"Update to XOD 0.30+ and re-export the project.","message":"Older versions (<0.30) accepted a different project format. Projects created with XOD <0.30 must be migrated.","severity":"deprecated","affected_versions":"<0.30.0"},{"fix":"Check the XOD documentation for board compatibility.","message":"The transpiler does not support all Arduino boards equally. Unsupported features may produce incomplete code.","severity":"gotcha","affected_versions":">=0.30.0"},{"fix":"Use only flat patch hierarchies or ensure all referenced patches are resolvable.","message":"The transpiler expects a flat project structure. Nested patches may not be handled correctly.","severity":"gotcha","affected_versions":">=0.30.0"}],"env_vars":null,"search_vec":"'0.37.0':12 'arduino':2,8,42,58 'base':53 'board':59 'c':9 'cadenc':68 'code':10,44,62 'compil':30 'core':29 'current':15 'differenti':45 'ecosystem':24 'embed':65 'entri':38 'generat':41,63 'given':32 'integr':47 'javascript':77 'multipl':57 'node':52 'node-bas':51 'optim':61 'overal':74 'packag':26 'paradigm':54 'part':18 'patch':39 'pipelin':31 'program':23 'project':6,35 'provid':27 'releas':17,67,75 'schedul':76 'sketch':43 'stabl':16 'support':55 'target':66 'tie':70 'tight':46 'transpil':3,4 'version':11 'visual':22 'xod':1,5,21,34,49,72","created_at":"2026-05-01T13:51:10.327304+00:00","updated_at":"2026-05-01T13:51:10.327304+00:00","problems":[{"fix":"Run 'npm install xod-arduino xod-project' in your project directory.","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'xod-arduino'"},{"fix":"Use 'import transpileForArduino from 'xod-arduino' instead of '{ transpileForArduino }'.","cause":"Incorrect import style; using named import instead of default import.","error":"TypeError: transpileForArduino is not a function"},{"fix":"Provide a string like '@/main' where 'main' is a valid patch name.","cause":"Entry point path does not follow the required format.","error":"Error: Invalid entry point path. Must start with '@/'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"xodc","cli_version":null,"type":"library","homepage":"https://xod.io","github":null,"docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/xod-arduino","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}