Maker.io main logo

Use Adafruit Feather RP20 USB host with BleuIO to create BLE application

2024-06-19 | By Sheikh Shuhad

License: General Public License Bluetooth / BLE Arduino Adafruit Feather RP2040

We are going to show how you can set up the USB stack and communicate with BleuIO using the Adafruit Feather RP2040 board. Later in the next project, we will show how to read a temperature and humidity sensor and display the data with the help of the Bluetooth Low Energy (BLE) interface. 

https://cdn-learn.adafruit.com/downloads/pdf/adafruit-feather-rp2040-with-usb-type-a-host.pdf

 

Adafruit Feather RP2040 for Seamless BLE Applications

Requirements

Setting Up the Development Environment

Arduino IDE Download 

This section covers getting your Arduino IDE set up to include your board. 

  • Download and install it to your computer.
  • Once installed, open the Arduino IDE. In the Arduino IDE, navigate to the Preferences window. Adafruit Feather RP2040 for Seamless BLE Applications
  • Copy the following URL and Add the URL to the Additional Boards Manager URLs field
  • https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json 
  • Selecting the Appropriate Board Configuration

    Add Board Support Package 

    • In the Arduino IDE, click on Tools > Board > Boards Manager. If you have previously selected a board, the Board menu item may have a board name after it. 
    • In the Boards Manager, search for RP2040. Scroll down to the Raspberry Pi Pico/RP2040 by Earle F Philhower, III entry. Click Install to install it.  Adafruit Feather RP2040 for Seamless BLE Applications
    • Choose Your Board 

      • In the Tools > Boards menu, you should now see Raspberry Pi RP2040 Boards (possibly followed by a version number). 
      • Navigate to the Raspberry Pi RP2040 Boards menu and choose Adafruit Feather RP2040 USB Host

      Now you’re ready to begin using Arduino with your RP2040 board! The main use case for this Feather is to act as a USB host.  

      Library Installation

      Install Adafruit_TinyUSB Library 

      To use your Feather as a USB host, you’ll need to install the Adafruit TinyUSB library. It can be installed using the Library Manager in the Arduino IDE. 

      Click the Manage Libraries > menu item, search for Adafruit TinyUSB, and select the Adafruit TinyUSBLibrary Adafruit Feather RP2040 for Seamless BLE Applications

    • Install Pico PIO USB Library 

      Additionally, you’ll need to install the Pico PIO USB library.

      Click the Manage Libraries > menu item again, search for PIO USB, and select the Pico PIO USB library.Adafruit Feather RP2040 for Seamless BLE Applications

    • Configuration and Deployment

      Board Upload Settings 

      • In the Tools menu, select Adafruit Feather RP2040 USB Host under Board.
      • For CPU Speed, you’ll need to select 120 MHz or240 MHz.
      • Finally, under USB Stack, select Adafruit TinyUSB.  

      Serial Host Bridge Example 

      • Load the example code onto your Feather after following the library installation instructions on the Arduino Library Install page
      • Navigate to the Adafruit TinyUSB Library Examples and select DualRole – CDC – serial_host_bridge Adafruit Feather RP2040 for Seamless BLE ApplicationsAdafruit Feather RP2040 for Seamless BLE Applications
      • Now you can control the BleuIO USB Dongle via the Adafruit Feather board. 

        With these steps completed, you’re now ready to start integrating BleuIO with your Adafruit Feather RP2040 board. This setup lays the foundation for exciting IoT projects, and we’ll explore more functionalities in future tutorials where we will show how to make the BleuIO USB Dongle advertise data from a temperature and humidity sensor. 

        Stay tuned for further guides on applying BleuIO and Adafruit Feather RP2040 for your projects!

制造商零件编号 SSD005/4-V2B
BLUETOOTH 5 LOW ENERGY USB DONGL
Smart Sensor Devices
¥256.49
Details
制造商零件编号 SSD005/4-V2W
BLUETOOTH 5 LOW ENERGY USB DONGL
Smart Sensor Devices
¥256.49
Details
制造商零件编号 5723
ADAFRUIT FEATHER RP2040 WITH USB
Adafruit Industries LLC
¥142.45
Details
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum