系统外设
利用具有不同架构的 Arduino® 板的硬件功能执行任务,例如通过 GPIO 模块读写模拟和数字信号,以及通过设备控制模块控制设备。
模块
Analog Input | Measure voltage of analog input pin |
Analog Output | Generate voltage on the specified DAC pin |
Analog Input SAMD | Read ADC register value after ADC conversion at the analog pin of Arduino SAMD21 core (自 R2023b 起) |
Analog Input AVR | Read ADC register value after ADC conversion at analog pin of Arduino AVR core (自 R2024a 起) |
Digital Input | Get logical state of digital input pin on Arduino |
Digital Output | Set logical state of digital output pin on Arduino |
PWM Common | Generate pulse width modulated signal on analog output pin |
PWM SAMD | Generate pulse width modulated signal on analog output pin of Arduino SAMD21 core (自 R2023b 起) |
PWM AVR | Generate pulse width modulated signal on analog output pin of Arduino AVR core (自 R2024a 起) |
Input Capture | Measure frequency and duty cycle of external input signal |
NeoPixel | Control color and brightness of RGB and RGBW Adafruit NeoPixel LED strip (自 R2024a 起) |
主题
- 支持的 Arduino 硬件
支持的 Arduino 硬件和 Arduino 兼容主板的列表。
- Pin Mapping for Arduino Timer-Independent Blocks
Pin mapping for blocks independent of the timer on the Arduino hardware board.
- Pin Mapping for Arduino Timer-Dependent Blocks
Pin mapping for blocks dependent of the timer on the Arduino hardware board.
精选示例
Generate Interrupts Using Arduino SAMD PWM Block
Use the Hardware Interrupt block to create an interrupt service routine (ISR) to react to the PWM events on your Arduino® hardware.
Get Started with Arduino SAMD Event System Using PWM and ADC Peripherals
Use the event system with Arduino Advanced PWM, Analog Input, and Hardware Interrupt blocks.
Estimate Battery Current of PMSM in Open-Loop Control Using Arduino Hardware
Use Simulink® Support Package for Arduino® Hardware to estimate the battery current of a permanent magnet synchronous machine (PMSM) in open-loop control using Motor Control Blockset™. This example also shows how to actuate a PMSM motor and calculate phase currents that are indirectly used to estimate the current of the battery.
Warn Dry Soil Moisture with Notification from IFTTT Using Arduino Based Smart Watering System
Use the WiFi HTTP Client block from the Simulink® Support Package for Arduino® Hardware to trigger a request to IFTTT once the moisture in the soil drops below a set threshold value and send a notification to an Android device.
Publish Data from Arduino Blocks and Read Data on Web Browser Using WebSocket Protocols
Use the Simulink® Support Package for Arduino® Hardware to publish and subscribe data from various Arduino blocks to a WebSocket server and to read data on a web browser in a WebSocket client.
Control Standard Servo Motor Using Arduino Hardware
Use Simulink® Support Package for Arduino® Hardware to control a standard servo motor.
Read Temperature from I2C-Based Sensor Using Arduino Hardware
Use Simulink® Support Package for Arduino® Hardware to configure and read temperature from an I2C based sensor.
Control LED Status Using BLE Peripheral and Central Devices on Arduino Boards
Use the Simulink® Support Package for Arduino® Hardware to configure Bluetooth® Low Energy (BLE) communication between Arduino peripheral and central devices. It also shows how to control the status of an onboard LED on a peripheral device from the central device and vice versa using BLE communication.
Drive with PID Control Using Arduino Board
Simulate a simple closed-loop control algorithm in Simulink® and how to run it on an Arduino® board.
Line Follower Application for Arduino Robot
Create a line follower algorithm in Simulink® and how to run it on an Arduino® Robot.
Add Echo to Audio File Stored in SD Card of Arduino Hardware
Add echo to an audio file read using the SD Card File Read block from Simulink® Support Package for Arduino® Hardware. On deployment, the Simulink model reads audio from the SD card, adds an echo effect to the audio, and then plays the audio with the echo through the headphones connected to the analog output pin of the hardware.
Shift Pitch of Audio File Stored in SD Card of Arduino Hardware
Shift the pitch of an audio file that is stored in an SD card of the Arduino® hardware using Simulink® Support Package for Arduino Hardware.
Add Reverb to Audio File Stored in SD Card of Arduino Hardware
Add reverb to an audio file read using the SD Card File Read block from Simulink® Support Package for Arduino® Hardware. On deployment, the Simulink model reads audio from the SD card, adds the reverb effect to the audio, and then plays the processed audio through the headphones connected to the analog output pin of the hardware.
Measure Frequency and Duty Cycle Using TCS230 Color Sensor and Arduino Hardware
Use the Simulink® Support Package for Arduino® Hardware to measure frequency and duty cycle of the red color component of an object using a TCS230 color sensor and Arduino hardware.
Control NeoPixel LEDs Using On-Board EEPROM on Arduino
Use the Simulink® Support Package for Arduino® Hardware to use the Adafruit® NeoPixel Digital LED strip and Arduino on-board EEPROM to create different lighting effects and patterns in External mode and Connected IO modes.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)