HOW TO: Control an Arduino with an iPhone using BLE



This simple example shows a C++/Objective-C program running on desktop, iPhone, and iPad communicating with an Arduino via Bluetooth BLE 4.0 HM-10. Also known as Bluetooth Low Energy. The entire C++ code for communicating with BLE is packed into two small files.

In this example I have boiled away everything except for that code required to open up a serial TX RX pipe to a BLE v4.0 module connected to an Arduino.

The Arduino is a Nano, the BLE v4.0 is an HC-10, and it is controlling a MOSFET FQP30N06L from an iPhone.

The C++ SDK is cocos2d-x but that is not critical to the C++ library in question.

Files available on GitHub:

https://github.com/LessonStudio/Arduino_BLE_iOS_CPP

source

Leave a Reply

Your email address will not be published. Required fields are marked *