简体   繁体   English

蓝牙Gatt特性的亮度

[英]Bluetooth Gatt Characteristics for Light Level

Does there exist a characteristic for light levels measured by a photoresistor? 光敏电阻测量的光水平是否存在特征? I cannot seem to find it in the bluetooth specifications, even though I imagined it would be under environmental sensing? 我似乎无法在蓝牙规格中找到它,即使我以为它会在环境感知下使用? Is there any way to use it anyway without choosing a different characteristic? 是否有任何方法可以使用它而不选择其他特征? https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicsHome.aspx https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicsHome.aspx

Is it possible to create a custom characteristic for use with light level? 是否可以创建用于照明水平的自定义特性? Or does it already exist somehow? 还是已经以某种方式存在?

I am using an Arduino 101 and I'm reading using BLE on Android. 我正在使用Arduino 101,并且正在Android上使用BLE进行阅读。

Yes, You can can create a Custom GATT service and use it to transfer the value you want. 是的,您可以创建一个自定义GATT服务并使用它来传输所需的值。 You should use unused 128 bit UUIDs as custom UUIDs. 您应该使用未使用的128位UUID作为自定义UUID。 Since this new UUID you created is not supported by Bluetooth, you have to take care of decoding this UUID from the other device to which you are sending date. 由于蓝牙不支持您创建的这个新UUID,因此您必须注意从发送日期的另一台设备解码该UUID。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM