What problem does it solve?
MATLAB's Support Package for Arduino Hardware natively supports only a fixed set of peripherals, so reading sensors like DHT22 or driving OLED displays from MATLAB requires building a custom Arduino add-on library that bridges MATLAB and Arduino C++ code.
Core Features & Use Cases
- Custom Add-On Scaffolding: Generates the
+arduinoioaddons package structure, MATLAB class, and C++ header using arduinoio.customLibrary.createLibraryTemplate or manual fallback for older releases.
- Third-Party Library Integration: Installs and wraps existing Arduino C++ libraries (e.g., DHT22, U8g2) via
arduinoio.customLibrary.downloadLibrary with correct LibraryHeaderFiles and DependentLibraries configuration.
- Hardware Conflict Prevention: Enforces rules for I2C/SPI bus ownership, lazy hardware initialization, and safe
sendResponseMsg usage to avoid server handshake failures and ARM board crashes.
- Use Case: A user asks "How do I read humidity in MATLAB from a DHT22 sensor?" The Skill checks native support, installs the DHT library, scaffolds the add-on, and produces working MATLAB and C++ code verified with
listArduinoLibraries.
Quick Start
Ask the agent to create a custom Arduino library in MATLAB for your unsupported sensor, providing the library name, the third-party Arduino library to wrap, and the target output directory.