Arduino 핀에서 데이터 읽기 및 쓰기
R2026b읽기 및 쓰기 함수를 사용하기 전에 arduino를 사용하여 Arduino 객체를 만듭니다. 자세한 내용은 Connect to Arduino Hardware 항목을 참조하십시오.
Arduino 탐색기를 사용하면 Arduino 및 기타 지원되는 하드웨어에서 대화형 방식으로 핀을 구성할 수 있으며, 이를 통해 MATLAB®과 MATLAB Online™에서 데이터를 읽고 쓸 수 있습니다. 자세한 내용은 Configure Read and Write for GPIO Pins Using Arduino Explorer App 항목을 참조하십시오.
설치된 MATLAB 버전에서 지원되는 하드웨어의 전체 목록을 보려면 Supported Hardware 항목을 참조하십시오. MATLAB Online에서 지원되는 보드, 워크플로, 플랫폼에 관한 자세한 내용은 Get Started with MATLAB Online for Arduino 항목을 참조하십시오.
참고
playTone을 제외한 모든 함수는 MATLAB Function 블록을 사용하여 코드를 생성합니다. 자세한 내용은 Deploy Arduino Functions to Arduino Hardware Using MATLAB Function Block 항목을 참조하십시오.
함수
arduino | Connection to the Arduino and Arduino-compatible ESP32 hardware |
configurePin | Set Arduino pin mode |
readDigitalPin | Read data from a specified pin on Arduino hardware |
writeDigitalPin | Write data to a specified pin on Arduino hardware |
writePWMVoltage | Generate PWM signal with specified voltage on digital pin |
writePWMDutyCycle | Generate PWM signal with specified duty cycle on digital pin |
playTone | Play tone on piezo speaker using digital pin |
readVoltage | Read voltage from analog pin on Arduino hardware |
도움말 항목
- Use Arduino Explorer App
Learn how to use the Arduino Explorer app to configure GPIO pins and communication protocol interfaces and visualize data.
- Configure Read and Write for GPIO Pins Using Arduino Explorer App
Learn how to read and write for GPIO pins using Arduino Explorer app