Sending Data

To demonstrate the functionality of the app using an Adafruit Feather Bluefruit 32u4 board, connect it 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:

You can 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 your Bluetooth device and your app.

Open the app you've made and then hit your button. 

When you tap the button, your message should pop up in the Arduino Serial monitor view.

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

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

You should receive a "Hello Back" in the console. 

Congrats!

You've successfully demonstrated the Bluetooth app's functionality and learned the basics of BLE communication using CoreBluetooth.  With this knowledge and the Basic Chat MVC app as a reference, you can start building even more complex Bluetooth apps!

This guide was first published on Jul 27, 2017. It was last updated on 2021-02-23 12:51:57 -0500.

This page (Communicating with the Arduino IDE) was last updated on Apr 15, 2021.

Text editor powered by tinymce.