Discovers, configures, and connects to Arduino boards from MATLAB using the Arduino Support Package. Handles board setup, serial port scanning, library configuration, and hardware I/O tasks like reading sensors or controlling servos.
Ships in test-and-measurement. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Guides the agent through discovering, configuring, and connecting to Arduino boards via USB, ensuring the user is informed and in control at each step.
matlab-create-custom-arduino-library)arduino object in the workspaceFollow these steps in order. Do not skip steps or guess values.
Core principle: Never assume. Always ask the user before proceeding if any information is unclear or ambiguous.
Always run both commands — do not skip serialportlist even if
arduinolist already found the board. This is a hard requirement:
list = arduinolist
ports = serialportlist("available")
Both calls are mandatory. Never omit serialportlist — arduinolist
alone misses boards without support package firmware.
arduinolist returns a table with Port, Board, Status, and Libraries
columns. However, it cannot list all connected boards as of R2026a — it
may only show one even when multiple are connected. Always also run
serialportlist("available") to catch all available ports.
If arduinolist is not available (pre-R2024a), skip it and rely on
serialportlist("available") alone.
Present both results to the user.
If arduinolist returns an empty table AND serialportlist("available")
shows no obvious Arduino ports (or all connection attempts fail), do not
brute-force all ports. Instead:
ls /dev/cu.usb* in a terminal. Arduino boards
typically appear as /dev/cu.usbmodem* or /dev/cu.usbserial*."dmesg | tail -20 after plugging in the board.
Look for /dev/ttyACM* or /dev/ttyUSB*."arduino object, restart MATLAB and reconnectSerial port names alone do not tell the user what device is connected. Guide the user to identify which ports are Arduino boards:
/dev/cu.usbmodem* or /dev/cu.usbserial*
entries — these are typically Arduino boards."dmesg | grep tty or look for /dev/ttyACM* and
/dev/ttyUSB* devices."Present the discovered boards/ports and ask the user which to connect to. Never auto-select a board.
Ask for:
arduino('<port>') which auto-detects the board typeFor multi-board scenarios, ask the user to identify each board by port and its intended role.
The default libraries are {'I2C', 'SPI', 'Servo'} — MATLAB loads these
automatically if no Libraries argument is specified.
Library strategy:
{'I2C', 'SPI', 'Servo'}| User mentions | Add library |
|---|---|
| ultrasonic, distance sensor, HC-SR04 | 'Ultrasonic' |
| shift register, 74HC595 | 'ShiftRegister' |
| rotary encoder, quadrature | 'RotaryEncoder' |
| motor shield, Adafruit motor | 'Adafruit/MotorShieldV2' |
| motor carrier, MKR motor | 'MotorCarrier' |
| CAN bus | 'CAN' |
| serial device, UART | 'Serial' |
| APDS9960, gesture, color sensor | 'APDS9960' |
Only infer from the table above when the match is explicit and unambiguous. If uncertain, ask the user rather than guessing libraries.
listArduinoLibraries and
show the full listBuild the arduino() call based on what you gathered:
% TEMPLATE — not executable
% With board type known + custom libraries:
a = arduino('<port>', '<board>', 'Libraries', {'I2C', 'SPI', 'Servo', ...});
% With board type known, default libraries only:
a = arduino('<port>', '<board>');
% Auto-detect board type (uses libraries already flashed on board):
a = arduino('<port>');
Important: You cannot specify 'Libraries' without also specifying the
board type. If the user doesn't know their board type but needs extra
libraries, run arduino('<port>') first to auto-detect, then read
a.Board and reconnect with the board type and libraries specified.
If the connection fails:
Common issues:
arduino object already exists in the workspace;
the user must clear it before reconnectingAfter successful connection:
| Function | Purpose | Available From |
|---|---|---|
arduinolist | Discover connected Arduino boards (table output) | R2024a |
serialportlist("available") | List all available serial ports | R2019b |
arduino(port) | Connect with auto-detected board type, default libraries | R2014b |
arduino(port, board) | Connect with specified board, default libraries | R2014b |
arduino(port, board, 'Libraries', libs) | Connect with specified board and custom libraries | R2014b |
listArduinoLibraries | List all available add-on libraries | R2014b |
% TEMPLATE — not executable
% Step 1: Discover
list = arduinolist;
ports = serialportlist("available");
% Step 3-5: Connect (after user selects port and board is known)
a = arduino('COM8', 'Nano33BLE', 'Libraries', {'I2C', 'SPI', 'Servo', 'Ultrasonic'});
% TEMPLATE — not executable
% Connect to each board with its own variable and libraries
a1 = arduino('COM8', 'Nano33BLE', 'Libraries', {'I2C', 'SPI', 'Servo'});
a2 = arduino('COM52', 'Uno', 'Libraries', {'I2C', 'SPI', 'Servo', 'Ultrasonic'});
| Mistake | Why It's Wrong | Correct Approach |
|---|---|---|
Using arduino() with no arguments | Connects to arbitrary board without user consent | Always discover first, let user choose |
| Guessing COM port or board type | Wastes time on wrong ports, reflashes wrong boards | Ask the user, or use auto-detect with port only |
| Loading only the needed library | Reconnecting later with more libraries takes 30+ sec | Load defaults {'I2C','SPI','Servo'} plus any inferred extras |
Using arduino(port, 'Libraries', libs) without board | Error: must specify both port and board before name-value pairs | Use arduino(port, board, 'Libraries', libs) or arduino(port) for auto-detect with defaults |
Skipping serialportlist when arduinolist succeeds | Misses boards without support package firmware or pre-R2024a boards | Always run both — serialportlist is mandatory even when arduinolist returns results |
| Killing processes to free a port | Destructive action without user consent | Report the port conflict, ask user to close the other application |
arduinolist AND serialportlist("available") in every discovery step — even if arduinolist already found the board. serialportlist catches boards that arduinolist does not recognize.{'I2C', 'SPI', 'Servo'} are always includedCopyright 2026 The MathWorks, Inc.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
13 skills in this plugin
/matlab-build-industrial-hmiBuild industrial-grade SCADA/HMI dashboards in MATLAB following industrial-HMI conventions (ISA-101-aligned): gray-field philosophy, alarms at source, write safeguards, fixed-range trends, drill-down layout. Produces a real App Designer app (.mlapp, or plain-text .m+.xml on R2026b+) by handing serialization to the matlab-build-app skill when available, and falls back to a programmatic .m app otherwise. Use when wrapping OPC UA / Modbus / MQTT / OSI PI / PI AF monitoring scripts into a live operator app, building plant overviews, designing operator dashboards, or any time a user asks for a "SCADA dashboard", "HMI", "plant dashboard", "operator screen", or "industrial monitoring app" in MATLAB. Trigger on: SCADA, HMI, industrial dashboard, plant overview, operator screen, uigauge, uilamp, alarm banner, gray-field, ISA-101, OPC UA dashboard, setpoint, write safeguards, alarm visualization, OSIsoft PI, AVEVA PI, PI Server, PI Data Archive, PI AF, PI Asset Framework, piclient, afclient.
/matlab-call-nidaqmxTranslate NI-DAQmx C function signatures into correct calldaqlib MATLAB calls. Use when the user mentions calldaqlib, any DAQmx* C function name (DAQmxCfgSampClkTiming, DAQmxExportSignal, DAQmxSetStartTrigRetriggerable, DAQmxGetSampClkRate, etc.), or needs NI-DAQmx functionality not exposed by the daq object. Covers: projection rules (taskHandle implicit, output pointers become return values, buffer-size args, enum-as-string), multi-task semantics, start() clobber, device-level empty-daq workaround, dictionary returns, string getter placeholder, array getter placeholder. Trigger contexts: low-level DAQ, escape hatch, retriggerable acquisition, shared timebase, export signal, connect terminals, external sample clock, trigger configuration, NI driver, C function translation.
/matlab-connect-bluetooth-low-energy-deviceDiscover and connect to Bluetooth Low Energy (BLE) peripheral devices from MATLAB. Use this skill when the user wants to scan for BLE devices, connect to a BLE peripheral, read or write BLE characteristics, subscribe to notifications, or any task that requires a BLE connection as a prerequisite (e.g., read sensor data over BLE, monitor heart rate, log accelerometer, stream data from wearable, IoT device communication). Triggers on: BLE, Bluetooth Low Energy, blelist, ble device, BLE characteristic, GATT, service UUID, scan for devices, BLE sensor, subscribe notify, BLE read, BLE write, peripheral device, BLE connect, wireless sensor.
/matlab-create-custom-arduino-libraryUse when the user wants to use Arduino sensors or peripherals from MATLAB that are not directly supported by the MATLAB Support Package for Arduino Hardware. Triggers on requests to create, wrap, or expose a custom Arduino library to MATLAB. Also triggers on indirect questions like "How do I read humidity in MATLAB?" or "How do I display text on an LCD from MATLAB?" where the answer requires a custom Arduino add-on library. Covers: custom addon creation, third-party Arduino library integration, LibraryBase class, C++ header files, DependentLibraries, arduinoioaddons namespace, I2C/SPI/GPIO peripheral wrappers.
/matlab-discover-hardwareDiscovers connected MATLAB-supported hardware devices, searches by capability, and checks required support packages and add-ons. Use when the user asks what hardware is connected, finds a device that supports a capability (e.g., CAN, analog input), or checks if required support packages or add-ons are installed. Does NOT connect to, configure, or acquire data from devices — defers to device-specific skills for usage workflows./matlab-enhance-camera-imageRead BEFORE troubleshooting or enhancing camera image quality. Diagnoses and enhances image quality from cameras connected via Image Acquisition Toolbox or USB Webcams support package. Discovers camera capabilities at runtime, analyzes captured images for quality issues (brightness, contrast, sharpness, noise, color balance, backlighting), suggests hardware setting adjustments tailored to the specific camera, and applies Image Processing Toolbox enhancement functions. Use when a user wants to improve camera image quality, troubleshoot dark/blurry/noisy/grainy/ overexposed/washed out/color cast images, or optimize camera settings.
/test-and-measurement:matlab-connect-arduinofrom test-and-measurement
npx claudepluginhub matlab/matlab-agentic-toolkit --plugin test-and-measurementOther plugins' skills for the same job