• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ios - 微 Controller 应该是外围设备还是中央设备?

[复制链接]
菜鸟教程小白 发表于 2022-12-12 17:58:28 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

我最近购买了一款名为 Bluno 的蓝牙 4.0 LE 微 Controller 。这是一款兼容 Arduino 的微 Controller ,内置 BT4.0LE,无需额外硬件。无论如何,我可以将微 Controller 编程为中央或外围设备,我计划用来与设备通信的 iPod Touch 5G 也是如此。

我最初认为我应该让 Bluno 充当中心,让 iPod Touch 充当外围设备,因为我用 Obj-c 编写的应用程序将消息发送到微 Controller ,而之前我们展示的微 Controller 基于行为在它将收到的消息上。

但是,当我查看销售 Bluno 的人编写的示例应用程序时,他们将 iDevice 配置为中央设备,这让我感到奇怪,因为他们的应用程序具有响应用户输入应用程序的内容的微 Controller ,然后让微 Controller 执行一个 Action 。

不用说我有点困惑,任何 build 性的想法将不胜感激。



Best Answer-推荐答案


手机和微 Controller 的作用实际上取决于您要创建的内容。

不过,在大多数情况下,微 Controller 都连接了一些传感器,并且可以通过蓝牙获取数据,这就是您的“外围设备”。处于“中心”角色的手机应用将读取该数据,并可能基于该数据进行一些用户交互。

这个 Apple 文档解释得很好:https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/AboutCoreBluetooth/Introduction.html

In Bluetooth low energy communication, there are two key players: the central and the peripheral. Each player has a different role to play in Bluetooth low energy communication. A peripheral typically has data that is needed by other devices. A central typically uses the information served up by a peripheral to accomplish some task. For example, a digital thermostat equipped with Bluetooth low energy technology might provide the temperature of a room to an iOS app that then displays the temperature in a user-friendly way.

关于ios - 微 Controller 应该是外围设备还是中央设备?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20988305/

回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap