ios - 微 Controller 应该是外围设备还是中央设备?
<p><p>我最近购买了一款名为 Bluno 的蓝牙 4.0 LE 微 Controller 。这是一款兼容 Arduino 的微 Controller ,内置 BT4.0LE,无需额外硬件。无论如何,我可以将微 Controller 编程为中央或外围设备,我计划用来与设备通信的 iPod Touch 5G 也是如此。</p>
<p>我最初认为我应该让 Bluno 充当中心,让 iPod Touch 充当外围设备,因为我用 Obj-c 编写的应用程序将消息发送到微 Controller ,而之前我们展示的微 Controller 基于行为在它将收到的消息上。</p>
<p>但是,当我查看销售 Bluno 的人编写的示例应用程序时,他们将 iDevice 配置为中央设备,这让我感到奇怪,因为他们的应用程序具有响应用户输入应用程序的内容的微 Controller ,然后让微 Controller 执行一个 Action 。</p>
<p>不用说我有点困惑,任何 build 性的想法将不胜感激。</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>手机和微 Controller 的作用实际上取决于您要创建的内容。 </p>
<p>不过,在大多数情况下,微 Controller 都连接了一些传感器,并且可以通过蓝牙获取数据,这就是您的“外围设备”。处于“中心”角色的手机应用将读取该数据,并可能基于该数据进行一些用户交互。</p>
<p>这个 Apple 文档解释得很好:<a href="https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/AboutCoreBluetooth/Introduction.html" rel="noreferrer noopener nofollow">https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/AboutCoreBluetooth/Introduction.html</a> </p>
<blockquote>
<p>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.</p>
</blockquote></p>
<p style="font-size: 20px;">关于ios - 微 Controller 应该是外围设备还是中央设备?,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/20988305/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/20988305/
</a>
</p>
页:
[1]