Benutzerdefinierte Arduino-Bibliotheken
R2026aEine Add-On-Bibliothek ist eine Kommunikationsschnittstelle zwischen benutzerdefiniertem C++ Code, der auf der Arduino-Hardware ausgeführt wird, und MATLAB®-Code, der auf Ihrem Host-Computer ausgeführt wird.
Mit Add-On-Bibliotheken können Endbenutzer direkt über die MATLAB-Befehlszeile auf weitere Funktionen eines Arduino zugreifen, indem sie bei der Erstellung eines arduino-Verbindungsobjekts die Bibliotheken aufnehmen. Ein Beispiel einer Add-On-Bibliothek finden Sie unter Control Motors Using Adafruit Motor Shield V2.
Das MATLAB-Supportpaket für Arduino-Hardware bietet Ihnen ein Klassen-Framework, mit dem Sie benutzerdefinierte Add-On-Bibliotheken zur Verwendung mit Ihrem Arduino-Gerät und zusätzlichen Hardware-Shields erstellen können. Dieses Supportpaket umfasst Klassen und Funktionen, mit denen Sie eine Add-On-Bibliothek entwickeln können; dies wird als Arduino Add-On Software-Development-Kit (SDK) bezeichnet.
Bevor Sie beginnen, ziehen Sie Custom Arduino Library Concepts zu Rate.
Wenn Sie bereit sind, eine eigene Add-On-Bibliothek zu erstellen, befolgen Sie die Schritte unter Create Custom Arduino Library oder sehen Sie sich Create a Custom Arduino Add-On Library an.
Klassen
matlabshared.addon.LibraryBase | Abstract class for deriving custom Arduino libraries |
Funktionen
Themen
Erste Schritte
- Custom Arduino Library Concepts
Understand the components and communication workflow of a custom Arduino library. - Create Custom Arduino Library
Access unsupported hardware and peripherals connected to Arduino boards by creating custom Arduino libraries that enable communication between MATLAB and Arduino hardware.
- SCHRITT 1: Create Custom Arduino Library Package Folder
- SCHRITT 2: Create and Configure C++ Header File
- SCHRITT 3: Create and Configure MATLAB Custom Arduino Library Class
- SCHRITT 4: Register Custom Arduino Library
- Adapt Add-ons to New matlabshared.addon.LibraryBase Class
Learn how to configure your existing add-on class to the new matlabshared.addon.LibraryBase class.
Arduino-Hardwareressourcen und Pin-Diagramm
- Custom Arduino Library Resources
Manage hardware resources among custom Arduino libraries. - Physical Terminals and Pin Numbers
Understand the difference between terminal numbers and pin numbers on your Arduino board.
Zusätzliche Informationen
- Send Data from Arduino to MATLAB Using Custom Library
Create your first custom Arduino library. - Enable Support for LCD Using Custom Arduino Library
Create a custom Arduino library for LCD support.