characteristic
Access a characteristic on Bluetooth Low Energy peripheral device
Description
A characteristic
object represents a characteristic of a
Bluetooth® Low Energy peripheral device. If read or write are supported in the object
Attributes
property, you can read characteristic values using
read
or you can
write characteristic values using write
. If the
characteristic has any descriptors, you can also access them using descriptor
.
Creation
Syntax
Description
creates an object that represents a characteristic on the peripheral device
c
= characteristic(b
,serviceName
,characteristicName
)b
using the service name and characteristic name. Identify
serviceName
and characteristicName
by viewing
the Characteristics
property of the ble
object
b
.
creates an object for a characteristic using its UUID and the service UUID. Identify
c
= characteristic(b
,serviceUUID
,characteristicUUID
)serviceUUID
and characteristicUUID
by viewing
the Characteristics
property of the ble
object
b
.
Input Arguments
Properties
Object Functions
read | Read characteristic or descriptor data on a Bluetooth Low Energy peripheral device |
write | Write data to a characteristic or descriptor on a Bluetooth Low Energy peripheral device |
subscribe | Subscribe to characteristic notification or indication |
unsubscribe | Unsubscribe from characteristic notification and indication |
descriptor | Access a descriptor on Bluetooth Low Energy peripheral device |
Examples
Version History
Introduced in R2019b