设备驱动程序
Editor's Note:This file was selected as MATLAB CentralPick of the Week
This package contains a guide that explains, in a step-by-step fashion, how to develop device driver blocks (blocks that perform target-specific functions when executed on a target platform).
Example drivers for:
-) Arduino digital output
-) Arduino digital input
-) Arduino analog output
-) Arduino编码器读
are included.
While the examples are built using the Arduino as the hardware platform (specifically relying on the Simulink Support Package for Arduino), the method applies to any other supported target.
In this guide, the first method to develop device drivers is based on the S-Function Builder block. Following chapters also describe different methods based respectively on the Legacy Code tool, the MATLAB function block, and the System Object block. Advantages and disadvantages of each method are discussed in the guide.
Finally, note that for MATLAB 2013b you will need to apply a fix for the S-Function builder to develop blocks with no input. To do so, go to the following page://www.tatmou.com/support/bugreports/1006532, scroll down to the bottom, and follow the instructions therein.
Cite As
Giampiero Campa (2021).设备驱动程序(//www.tatmou.com/matlabcentral/fileexchange/39354-device-drivers), MATLAB Central File Exchange. Retrieved.
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Acknowledgements
Inspired by:Simulink Support Package for Arduino Hardware,Simulink Support Package for Raspberry Pi Hardware
Inspired:Driver for Arduino Data Logging Shield,Play a Tune on Arduino,Arduino - Loop Time S-Function,设备驱动程序for the BeagleBone Black,Arduino Additional Sensors Library (DHT, LPS331),Soft Real Time,Data Logger on Arduino UNO,Simulink Library for MiniQ Robot,Rensselaer Arduino Support Package Library (RASPLib),Raspberry Pi Simulink Driver Blocks ADC DAC PWM,Arduino Udp Ethernet Shield,3 Note Piano on Arduino with S-Functions,Embedded Coder Target for Arduino,ADLX345 i2c Driver for Arduino Mega,Example Driver blocks for Simulink Hardware Support Packages,Raspberry Pi Driver Block SFunction,Raspberry Pi DC Motor H-Bridge Driver Block SFunction,Raspberry Pi PWM Driver Block SFunction,Raspberry Pi Quadrature Encoder SFunction,Arduino S Function for MPC4725 I2C DAC,Raspberry Pi MPU6050 SFunction with I2C Communication using WiringPiI2C,RC Receive Driver Block for Arduino,金宝app模型库Zumo机器人,Motor Shields,SEN0140 Simulink i2c Driver for Arduino Mega 2560,Controle moteur à courant continu avec arduino
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.