Bluetooth Low Energy TinyShield (ST) Tutorial

by TinyCircuits Staff May 10, 2017

Bluetooth Low Energy TinyShield (ST) Tutorial

This tutorial will cover the basic operation of the BLE TinyShield using a standard TinyDuino and a Bluetooth-enabled device, such as a smartphone or tablet. To communicate with the stack, we will use the nRF UART v2.0 Android application and the nRF Connect iOS application. Click the link to download the application to your mobile device before starting the tutorial.

Once that is finished, we will start by adding files to our Arduino environment.

Installing the STBLE Library


Click here to download STBLE.zip. You can also download this file by clicking the "Arduino Library and Example Code" link on the BLE TinyShield product page. After completing the download, open the Arduino IDE.

Select Sketch > Include Library > Add .ZIP Library. Navigate to your Downloads folder and select the folder STBLE.zip. Select "Open." The IDE should display a message that the library was added successfully.

Using the Example Code


Restart the Arduino IDE. Select File > Examples > STBLE > UARTPassThrough. This should open the code below.

With your TinyDuino plugged in and powered on, upload the code. Open the Serial Monitor and the nRF UART v2.0 application on your device. Enable Bluetooth connection.

Follow the images above to connect to the TinyDuino stack. The TinyShield will always appear as "BlueNRG." Once the two devices connect, your Serial Monitor should display something similar to the image below.

We'll start by sending a number to the application using the Serial Monitor. Type in '54' and press Send.

The application should display the message "RX: 54."

Now, we'll send to our TinyDuino the number in reverse. Type '45' into the application text box and tap Send.

The Serial Monitor should display the number 45. The number preceding it with a colon indicates the number of characters that were sent. Only 20 characters may be sent between the two devices.

Questions? Concerns?


As always, if you have any issues following this tutorial or have additional questions, feel free to post on our forum or email us at info@tinycircuits.com. We appreciate your feedback!

 



TinyCircuits Staff
TinyCircuits Staff

Author



Also in Learn

How to Develop a Game for the TinyArcade
How to Develop a Game for the TinyArcade

by Brandon Farmer March 30, 2017

This Tutorial will walk you through how to develop your very own game for the TinyArcade, all within the Arduino...

View full article →

.TSV Video Converter Tutorial
.TSV Video Converter Tutorial

by TinyCircuits Staff March 30, 2017

Learn how to convert your videos to .TSV format using this Windows program!

View full article →

How to Load TinyArcade Games onto an SD Card
How to Load TinyArcade Games onto an SD Card

by TinyCircuits Staff March 30, 2017

This tutorial will walk you through how to load TinyArcade Games onto your SD Card to make them accessible from...

View full article →