I2C Controller Read
R2026bLibraries:
UAV Toolbox Support Package for ArduPilot Autopilots /
Peripheral Blocks
Description
Add-On Required: This feature requires the UAV Toolbox Support Package for ArduPilot Autopilots add-on.
The I2C Controller Read block reads serial data from an I2C peripheral device connected to the board.
Use this block to:
Communicate with I2C peripheral devices on ArduPilot autopilot hardware.
Read data from specific registers on I2C peripheral devices. To read from a specific register, enable the Enable register access parameter.
To view the mapping between the bus numbers and the port labels on hardware board, click View I2C Bus map.
Simulation Behavior:
Normal mode simulation — The block outputs zeros.
Connected I/O simulation — The block reads data from the peripheral devices connected to the hardware.
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.
"ardupilotPeripheralslib/I2C Controller Read"
Example: add_block("ardupilotPeripheralslib/I2C Controller Read","myModel/myBlock",MakeNameUnique="on")
For information about programmatic access to individual block parameters, see the Programmatic Use section of parameter descriptions on this page.
Version History
Introduced in R2026b
