Analog Input
R2026bRead ADC register value after ADC conversion at analog pin of Arduino AVR core
Since R2024a
Libraries:
Simulink Support Package for Arduino Hardware /
Advanced /
AVR
Description
Add-On Required: This feature requires the Simulink Support Package for Arduino Hardware add-on.
Use the Analog Input block to read the value from an ADC register after analog to digital conversion on the Arduino® AVR analog pin. You can use the block to read up to three analog voltage outputs simultaneously.
Note
The Analog Input block supports C/C++ code generation. This feature allows you to generate C and C++ code using Embedded Coder®.
Ports
Output
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"arduinoavrlib/Analog Input"
Example: add_block("arduinoavrlib/Analog Input","myModel/myBlock",MakeNameUnique="on")
More About
Version History
Introduced in R2024a