Lesen und Schreiben von Daten von und auf Arduino-Pins
R2026bErstellen Sie mithilfe von arduino ein Arduino-Objekt, bevor Sie die Lese- und Schreibfunktionen verwenden. Weitere Informationen dazu finden Sie unter Connect to Arduino Hardware.
Sie können mit Arduino Explorer Pins auf Arduino und anderer unterstützter Hardware interaktiv konfigurieren und so Daten in MATLAB® und MATLAB Online™ lesen oder schreiben. Weitere Informationen finden Sie unter Configure Read and Write for GPIO Pins Using Arduino Explorer App.
Eine vollständige Liste der unterstützten Hardware der installierten MATLAB-Version finden Sie unter Supported Hardware. Weitere Informationen zu unterstützten Platinen, Workflows und Plattformen, die von MATLAB Online unterstützt werden, finden Sie unter Get Started with MATLAB Online for Arduino.
Hinweis
Alle Funktionen außer playTone generieren Code mithilfe des MATLAB-Funktionsblocks. Weitere Informationen finden Sie unter Deploy Arduino Functions to Arduino Hardware Using MATLAB Function Block.
Funktionen
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 |
Themen
- 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