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