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

New Tiny Arcade - Assembly Instructions (With Rev5 Boards)
New Tiny Arcade - Assembly Instructions (With Rev5 Boards)

by TinyCircuits Staff July 27, 2017

We are super excited to release our latest version of the beloved Tiny Arcade kit! This assembly tutorial features our...

View full article →

New Tiny Arcade - Assembly Instructions
New Tiny Arcade - Assembly Instructions

by TinyCircuits Staff July 25, 2017

We are super excited to release our latest version of the beloved Tiny Arcade kit! We've updated the design for...

View full article →

TinySaber Reprogramming - A How-To Guide
TinySaber Reprogramming - A How-To Guide

by TinyCircuits Staff July 18, 2017

This tutorial will walk you through how to reprogram your TinySaber to include custom POV text, special colors, lighting effects,...

View full article →