Maker Portal

View Original

iOS and Arduino Bluetooth Communication Using The BLExAR App and CC2541 Module

See this content in the original post

BLExAR App - Arduino and iOS Bluetooth Communication


See this content in the original post

Below are the minimal components needed to communicate and send strings between Arduino and an iOS device.

See this content in the original post

See this content in the original post

In order for the Arduino board to cleanly communicate with the HM-10 Bluetooth module, we must upload the “Bare Minimum” sketch to ensure that the serial pins are not being used. The images below show the “Bare Minimum” sketch, which should be located under “File -> Examples” in the Arduino IDE.

After uploading the bare minimum sketch, follow the methods below for testing and wiring the HM-10 Bluetooth module.


See this content in the original post

At this point, the Arduino board should have the “Bare Minimum” sketch uploaded. The wiring shown in Figure 1 is the simplest way to communicate with an iOS device via Bluetooth. The diagram allows the user to send strings back and forth from the Arduino board to an iPhone or iPad using the BLExAR app. After connecting to the BLE module, check that simple “AT” commands are working on the HM-10 and Arduino setup. If AT commands are unfamiliar, follow the screenshots below and ensure that the Arduino serial monitor is producing similar results.


See this content in the original post

Now that our Arduino and HM-10 Bluetooth module are wired correctly and some simple AT commands have been tested, we can open up the BLExAR app on our iOS device. The first window on the BLExAR app should look like the following:

Now, by clicking on your newly renamed BLE device (in my case, it’s the one called BLExAR), we will be taken to the following window:

We aren’t quite ready for pin controls, so we will click the “Console” tab to get to the serial communication window.


See this content in the original post

This tutorial demonstrates the basic communication between an iOS device and a Bluetooth-enabled Arduino board. The communication is conducted using the BLExAR iOS app and its Console window, which allows communication via UTF-8 String encoding. The tutorial demonstrates the functionality of the BLExAR app and the ability to connect an Arduino board to an iOS device using a simple-to-use app and a cheap Bluetooth Low Energy module (CC2541-based). There will be many tutorials to follow using the BLExAR app, focusing on other applications from data acquisition, Arduino control using an iOS device, and specific projects using the app.

See More in BLExAR and Arduino:

See this gallery in the original post