Battery Read
Read voltage of battery
Add-On Required: This feature requires the Simulink Support Package for Arduino Hardware add-on.
Libraries:
Simulink Support Package for Arduino Hardware /
Arduino Motor Carrier
Description
The Battery Read block reads the voltage of the battery connected to an
MKR or Nano Motor Carrier. The block outputs the voltage as a 12-bit digital value
ranging between 0
and 4095
. An output of
0
corresponds to minimum volts and an output of
4095
corresponds to maximum volts on an analog pin connected to
the battery.
If you simulate a model that contains the Battery Read block without connecting the hardware, the block outputs zeroes. For more information, see Block Produces Zeros or Does Nothing in Simulation.
Supported Hardware
You can use the Battery Read block only with MKR and Nano 33 IoT boards.
Ports
Output
Parameters
Version History
Introduced in R2019a