사용자 지정 Arduino 라이브러리를 사용하여 추가 주변기기 지원하기
R2026b사용자 지정 Arduino® 라이브러리는 Arduino 하드웨어에서 실행되는 사용자 지정 C++ 코드와 개발 컴퓨터에서 실행되는 MATLAB® 코드 간의 통신 인터페이스입니다.
사용자 지정 Arduino 라이브러리를 제공하면, arduino 연결 객체를 만들 때 라이브러리를 포함시켜서 MATLAB 명령줄에서 직접 Arduino의 추가 기능에 액세스할 수 있습니다. 사용자 지정 Arduino 라이브러리에 대한 예는 Control Motors Using Adafruit Motor Shield V2 항목을 참조하십시오.
MATLAB Support Package for Arduino Hardware는 클래스 프레임워크를 제공합니다. 이를 사용하여 Arduino 장치와 여기에 연결된 하드웨어 쉴드에서 사용할 수 있는 사용자 지정 Arduino 라이브러리를 만들 수 있습니다. 이 지원 패키지는 사용자 지정 Arduino 라이브러리를 개발하는 데 도움이 되는 클래스와 함수를 제공하며, 이를 통칭하여 사용자 지정 Arduino 라이브러리 프레임워크라고 합니다.
다음 워크플로 중 하나를 사용하여 사용자 지정 라이브러리를 만들 수 있습니다.
사용자 지정 Arduino 라이브러리 패키지 폴더, MATLAB 클래스, C++ 헤더 파일을 만들고 구성합니다. Create Custom Arduino Library의 단계를 따르거나 수동으로 사용자 지정 Arduino 라이브러리 만들기를 시청하십시오.
함수
arduinoio.customLibrary.createLibraryTemplate을 사용하여 필수 폴더 구조, MATLAB 클래스, C++ 헤더 파일이 포함된 시작용 사용자 지정 Arduino 라이브러리를 생성합니다. 그런 다음 생성된 템플릿을 수정하여 사용자 지정 기능을 구현할 수 있습니다.
시작하기 전에 Custom Arduino Library Concepts 항목을 참조하십시오.
클래스
matlabshared.addon.LibraryBase | Abstract class for deriving custom Arduino libraries |
함수
도움말 항목
시작하기
- 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.
- Create Custom Arduino Library Using Template
Use thearduinoio.customLibrary.createLibraryTemplatefunction to generate template files for a 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 하드웨어 리소스와 핀 다이어그램
- 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.
추가 정보
- 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.