Main Content

LED

Illuminate built-in LED on Raspberry Pi board

Add-On Required: This feature requires the Simulink Support Package for Raspberry Pi Hardware add-on.

  • Raspberry Pi LED block

Libraries:
Simulink Support Package for Raspberry Pi Hardware / Basic

Description

Use the LED block to illuminate a user-controllable LED on the Raspberry Pi® board. During simulations without the hardware, this block does nothing. See Block Produces Zeros or Does Nothing in Simulation.

Note

Do not specify the same LED in multiple blocks within a model.

Ports

Input

expand all

If the input to the block is a nonzero value, the LED specified in the LED parameter turns on. If the input to the block is zero, the LED specified in the LED parameter turns off.

For example, if the LED parameter is set to led0(Green) and the input to the block is 5, the green LED on the hardware starts glowing.

Data Types: uint8

Parameters

expand all

Select your Raspberry Pi hardware board. You can find this information on the target hardware, product packaging, or product documentation.

Select the LED to be turned on or off on your Raspberry Pi hardware board. To view the locations of the LED on the Raspberry Pi board, click View LED location.

Version History

Introduced in R2013a