Analog Input

Measure voltage of specified analog input pin

  • Library:
  • Simulink Coder Support Package for BeagleBone Blue Hardware / Basic

Description

This block measures the voltage of a specified analog input pin. The block outputs the measurement as a double value.

Ports

Output

expand all

Measure the voltage of an analog pin relative to the analog input reference voltage on the BeagleBone® Blue hardware. If the measured voltage equals the ground voltage, the block outputs 0 in raw mode, and 0 in volt mode. If the measured voltage equals the analog reference voltage, the block outputs 4096 in raw mode, and 1.8 in volt mode.

Data Types: double

Parameters

expand all

Specify the pin number.

To open the pin mapping table, click View pin map.

Make sure to assign different pin numbers to the different blocks of your model.

  • Raw - The block outputs the voltage as a 12-bit digital value.

  • Volt - The block outputs the voltage in volts

Specify how often this block measures the voltage of the analog input pin, in seconds.

When you specify this parameter as-1, Simulink® determines the best sample time for the block based on the block context within the model.

Introduced in R2018b