发 帖  
原厂入驻New
实战多通道高速精密测温仪的全系列设计教程,以实际项目为依托,提升工程师核心竞争力!→点击立即抢购←
[问答] 如何通过蓝牙向CySmart移动应用程序打印字符串?
434 蓝牙 cysmart 应用程序
分享
我使用ADC来监视模拟输入电压的电压到我的BLE先锋工具包。我目前正在印刷油灰的电压。通过添加几行代码,是否有一种简单的方法通过蓝牙向手机应用程序发送这些参数?有没有一种简单的方法来打印CyScript应用程序?
谢谢

以上来自于百度翻译


     以下为原文
  I am using ADC to monitor the voltage of an analog input value to my BLE Pioneer Kit. I am currently printing the voltage to putty. Is there an easy way to send these values via Bluetooth to a phone app by adding a few lines of code? Is there an easy way to print strings to the Cysmart app?
    Thanks
0
2019-6-28 09:32:25   评论 分享淘帖 邀请回答
5个回答
这个项目的重点是我正在不断地监视一个与我的先锋工具箱中的模拟电路连接的传感器的电压。我希望能够使用移动应用程序来读取传感器读数。有没有人现在做过这样的项目?如果手机应用程序能够实时地在手机上绘制电压值,那就更好了,但这不是必需的。

以上来自于百度翻译


     以下为原文
  The point of this project is I'm trying to continuously monitor the voltage of a sensor that is connected to analog in on my pioneer kit. I want to be able to use the mobile app to see the sensor reading. Does anyone have any projects that currently do this?  It would be even better if the mobile app could graph the voltage values in real time on the phone but this is not required.
2019-6-28 09:47:04 评论

举报

也许这个视频系列可以帮助你的HTTPS://www. Youtub.com /手表?V= 51 UQKBZTTHG

以上来自于百度翻译


     以下为原文
  Maybe this video series can help you https://www.youtube.com/watch?v=51uQKbztthg
2019-6-28 09:53:41 评论

举报

您可以添加自定义服务,其具有代表ADC读取的单一特性。更新此值时,可以向BLE应用程序发送通知。
这样,BLE应用程序接收当前值,并且如果它想要的话也可以绘制它。

以上来自于百度翻译


     以下为原文
  You can add a custom service, with a single characteristic that represents the ADC reading. When updating this value, you can send a notification to the BLE app.
    That way the BLE app receives the current value, and can also graph it if it wants to.
2019-6-28 09:59:08 评论

举报

lxhzx 发表于 2019-6-28 09:59
您可以添加自定义服务,其具有代表ADC读取的单一特性。更新此值时,可以向BLE应用程序发送通知。
这样,BLE应用程序接收当前值,并且如果它想要的话也可以绘制它。

谢谢你的评论。在配置BLE设置时,我创建了带有GATT GATT和GAP外围设备的自定义配置文件。然后,我将自定义服务UUID设置为CAB5。当我到达自定义特性时,如果我试图发送ADC值,我应该设置UUID?还应该检查哪些描述符属性?我对这一点是全新的,对设置BLE有很大帮助。

以上来自于百度翻译


     以下为原文
  Thanks for your comment. When configuring the BLE settings, I created a custom profile with profile GATT and GAP peripheral. Then I set the custom service UUID to CAB5. When I get to custom characteristic, what should I set the UUID to if I'm trying to send ADC values? Also what descriptor properties should I check? I am brand new to this, so steps to set up the BLE would be very helpful. 
2019-6-28 10:05:06 评论

举报

lisa1 发表于 2019-6-28 10:05
谢谢你的评论。在配置BLE设置时,我创建了带有GATT GATT和GAP外围设备的自定义配置文件。然后,我将自定义服务UUID设置为CAB5。当我到达自定义特性时,如果我试图发送ADC值,我应该设置UUID?还应该检查哪些描述符属性?我对这一点是全新的,对设置BLE有很大帮助。

以上来自于百度翻译

UUID通常是一个随机常数(由您/应用程序/软件)来确定您是否正在访问/读取/写入您想要的特性/服务。因此,UUID将自动生成到一个128位的值,您可以使用它作为唯一标识符(16位UUID是BLE SIG分配的标准值)。只要你从两个BLE芯片/手机/应用程序读取/写入时使用相同的UUID,那么指定UUID是什么也不重要。
因此,您可以在BLE组件中生成自定义特性,然后检查当您从软件读取/写入该UUID常量值时,将其与特性中的UUID常量值进行比较。
描述符属性将设置是否允许读/写/广播/数据访问等。并且许可允许一些过滤,其中每个特征可访问加密/认证级别。(一般来说,如果您希望另一方能够读取它,我会检查读取,如果您希望另一方能够写入,请写入,并通知您是否希望能够发送该特性的通知。其他复选框对它们有各种应用/限制,但一般不使用IMO。
如果你查看我在附加图像中循环的“生成UUID”,你可以使用它来创建一个相对唯一的UUID,而不是必须自己跟踪值(否则你可以跟踪你自己:)
通用特征设置
34.3 K

以上来自于百度翻译


     以下为原文
  The UUID is generally a random constant used (by you/apps/software) to determine if you are accessing/reading/writing to the characteristic/service that you want to. Thus, the UUID will be auto-generated to a 128-bit value that you can use as a unique identifier (the 16-bit UUIDs are standard values assigned by the BLE SIG). As long as you use the same UUID when reading/writing from both BLE chips/phones/apps, then it will not matter what the specifc UUID is.
    Thus, you can generate the custom characteristic in the BLE component, then check that you compare to that UUID constant value in the characteristic when you read/write to it from software.
    The descriptor properties will set whether it allows Read/Write/Broadcast/etc. for data access. And the permissions allows some filtering for which encryption/authentication levels of access are available for each characteristic. (Generally, I would check Read if you want the other side to be able to read it, Write if you want the other side to be able to write it, and Notify if you want to be able to send notifications for that characteristic. The other check boxes have various applications/restrictions upon them, but generally not used imo).
    If you look at the "Generate UUID" that I circled in the attached image, you can use this to create a relatively unique UUID rather than having to keep track of the values yourself (otherwise you can keep track yourself :) )


2019-6-28 10:17:47 评论

举报

只有小组成员才能发言,加入小组>>

346个成员聚集在这个小组

加入小组

创建小组步骤

关闭

站长推荐 上一条 /10 下一条

快速回复 返回顶部 返回列表