主要内容

enableSensor

Enable sensors available on the Sense HAT to read values

Description

enableSensor (mysensehat) enables all the sensors on the senseHAT.

enableSensor (mysensehat, sensorName) enables the specified sensor on senseHAT.

By default, the sensors are enabled. To read values from the sensors, you must have the sensors be enabled.

Note

To generate C/C++ code for this function, you must have an Embedded Coder® license.

example

Examples

collapse all

You can enable the sensor available on the Sense HAT.

enableSensor (mysensehat)

Input Arguments

collapse all

Connection to a SenseHAT board, specified as a sensehat object.

The name of the sensor that you want to enable.

Extended Capabilities

expand all

Version History

Introduced in R2016b