iPhone - Any examples of communicating with an Arduino board using Bluetooth?

浪子不回头ぞ 提交于 2019-12-03 21:48:48

Unfortunately, standard Bluetooth communications with devices on iOS is restricted to devices within the MFi program, so you're not going to be able to use that with your Arduino board. However, the new Bluetooth 4.0 LE protocol that is supported in newer iOS devices (iPhone 4S, Retina iPad) is open and can be used to connect any LE device.

iOS 5.0 introduced a new framework for this in Core Bluetooth, and I highly recommend watching the two sessions from WWDC 2012 about this. They also have some sample code on the topic. I've been using this myself to connect to some sensors, and it works well for a low-bandwidth application like temperature, proximity, or heart rate sensing.

There are several BT LE modules out there, and it looks like Dr. Michael Kroll is about to start producing an Arduino shield for LE communication, which would make it trivial to add this kind of capability onto an Arduino board.

It's probably a bit late for your project, but the RedBear BLE Shield coupled with an Arduino works great. There is even a robotic truck project built around this combination in Building iPhone and iPad Electronics Projects.

You can access the BLE shield using Objective C, but it's also possible to avoid a Mac entirely and use techBASIC, which lets you program right from the iPhone or iPad.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!