Question

For my current project, I need to read the status of a digital ON/OFF input (0Volt or 5 Volt) from iPad.

I need to do this by bluetooth becouse the iPad needs the 3G connection to contact some web services in internet and this prevent me to use a WIFI module.

I read that exists some module like RN42 ( https://www.sparkfun.com/products/retired/10253 ) or Bluegiga ( http://www.bluegiga.com/ )

but I can't find some example in internet to do what I need.

I need an help to understand what is the best and cheaper hardware that I must buy, and, most of all, I need of some example of code (xCode) for connect my iOS program to the bluetooth module for get the status of my external digital input.

Was it helpful?

Solution

You have a number of options for doing this.

  • Join the MFI program and either read the input via a physical connector or via Bluetooth.
  • Use Wi-Fi. Probably easiest in terms of programming but requires more expensive hardware (and maybe more complicated installation)
  • Use BLE (Bluetooth Low Energy) and CoreBluetooth. Cheap, easy to use.

As you have already suggested, BLE is an easy way to go that doesn't require joining an expensive program. The Bluegiga chips are excellent in talking with an iOS device (I have personally tried the BLE112 device) and they are easy to program, comes with their own microcontroller etc.

To start on the iOS side, you need to read up on CoreBluetooth. Apple has in general excellent documentation about this framework.

I would recommend starting out with the examples, for example the Heart Rate monitor sample project. Also consider buying a dev kit from Bluegiga, it has among other things, a Heart rate device sample that works with iOS.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top