Main Content

Potentiometer

Read the state of a potentiometer

Add-On Required: This feature requires the Simulink Coder Support Package for NXP FRDM-KL25Z Board add-on.

Library

Simulink Coder Support Package for NXP FRDM-KL25Z Board/ FRDM-TFC Shield

  • Potentiometer block

Description

The NXP TFC shield comes with two on board potentiometers (POTA and POTB).

The block output emits values from -1.0 to 1.0 based on the current angular position of the potentiometer. These values correspond to the potentiometer being turned fully counter clockwise or fully clockwise respectively.

During simulations without the hardware, this block emits zeroes.

Parameters

Potentiometer

Select potentiometer A or B.

Sample time

Specify how often this block reads the potentiometer value, in seconds.