Skip to main content

Bluetooth Usage (Seeed nRF52 Boards Library)

Seeed Studio XIAO nRF52840 and Seeed Studio XIAO nRF52840 Sense both support Bluetooth connectivity. This wiki will introduce the basics Bluetooth function used by "Seeed nRF52 Boards Library".

Getting Started

Hardware Required

Software Required


Since the function we apply is packing in the "Seeed nRF52 Boards Library", we don't have to install another third-party library. You can skip the step.

  • Method One (This method is available for both of the above code libraries.)

Since you have downloaded the zip Library, open your Arduino IDE, click on Sketch > Include Library > Add .ZIP Library. Choose the zip file you just downloaded,and if the library install correct, you will see Library added to your libraries in the notice window. Which means the library is installed successfully.

  • Method Two (Only the ArduinoBLE library can be installed.)

The library manager was added starting with Arduino IDE versions 1.5 and greater (1.6.x). It is found in the 'Sketch' menu under 'Include Library', 'Manage Libraries...'

When you open the Library Manager you will find a large list of libraries ready for one-click install. To find a library for your product, search for the product name or a keyword such as 'k type' or 'digitizer', and the library you want should show up. Click on the desired library, and the 'Install' button will appear. Click that button, and the library should install automatically. When installation finishes, close the Library Manager.

Application examples

We here will introduce you Bluetooth applications.

Wireless Connect a PC Keyboard to the Mobile Phone

Step 1. Launch the Arduino application.

Step 2. Select your development board model and add it to the Arduino IDE. Here we are using "Seeed nRF52 Boards Library".

For the board libraries installation, please refer to this tutorial to finish installation.

Step 3. Nevigate to "File -> Examples -> Adafruit Bluefruit nRF52 Libraries -> Peripheral -> blehid_keyboard" and open the "blehid_keyboard" exapmle file.

Step 4. Click "Upload" and then open the "monitor" on the upper right corner of the Arduino IDE. The monitor will be shown as:

Step 5. Open the "nRF Connect for Mobile" App or "LightBlue" App on your mobile phone, meanwhile make sure your phone is connecting with Bluetooth. After a while, you will find a device named "XIAO nRF52840" listed.

  • For nRF Connect for Mobile APP it should be like:
  • For LightBlue APP it should be like:

Step 6. Simply click the device and the connection will be completed automatically. After that we can type characters into the monitor with PC keyboard, and then see what happens on your mobile phone.

What's more?

If you want to try out more examples you can navigate to File > Examples > INCOMPATIBLE > ArduinoBLE and check all the examples under ArduinoBLE

Tech Support & Product Discussion

Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.

Loading Comments...