Analog Input
Read ADC register value after ADC conversion at the analog pin of Arduino SAMD21 core
Since R2023b
Add-On Required: This feature requires the Simulink Support Package for Arduino Hardware add-on.
Libraries:
Simulink Support Package for Arduino Hardware /
Advanced /
SAMD
Description
Use the Analog Input block to read the value from an ADC register after analog to digital conversion on the Arduino® SAMD21 analog pin. You can use the block to read up to three analog voltage outputs simultaneously.
Use the block inside a downstream function call subsystem that executes the ADC conversion operation based on an interrupt service routine (ISR) trigger. You specify the ISR trigger using a Hardware Interrupt block.
Note
The Analog Input block supports C/C++ code generation. This feature allows you to generate C and C++ code using Embedded Coder®.
Supported Arduino Boards
Arduino MKR 1000
Arduino MKR ZERO
Arduino MKR Wi-Fi® 1010
Arduino Nano 33 IoT
Ports
Output
Parameters
Version History
Introduced in R2023b