Sending Data

We can demonstrate the functionality of the Basic Chat app using an Adafruit Feather Bluefruit 32u4 board connected to a computer running the Arduino IDE.  If you don't already have your Arduino IDE setup or if it's not recognizing your board, take a look at this learn guide on how to do so:

We'll use the serial monitor to read and write messages back and forth with the Basic Chat app.

Within the Arduino IDE, go to File->Examples->Adafruit BluefruitLEnRF51 then select bleart_cmdmode.  Once the sketch is opened, upload it to your Feather and click on the Serial Monitor button in the upper right of the Arduino IDE window.  A new serial monitor window will open.

This new serial monitor window is where you'll be able to communicate between the Feather and the Basic Chat app.

Let's start by sending data to the Feather from the Basic Chat app.  First, open up the Basic Chat app, then select Adafruit Bluefruit LE.

When we're in the UARTModule view we'll send a simple..."Hello World!" string in the text field below. Hit Send when you're done.

Now you've successfully sent the string "Hello World!" to the feather and it displayed in the Serial monitor view. 

Now let's send "Hello World!" to the Basic Chat app. Type "Hello World!" in the text field of the Arduino IDE's serial monitor window and then hit Send.

Your "Hello World!" string should show up in the Basic Chat app's console.

Congrats!

You've successfully demonstrated the Basic Chat app's functionality and learned the basics of BLE communication using CoreBluetooth.  With this knowledge and the Basic Chat app as a reference, you can start building your own BLE-capable apps for iOS!

This guide was first published on Jul 27, 2017. It was last updated on Jul 27, 2017.

This page (Communicating with Arduino IDE) was last updated on Nov 24, 2020.