Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use Adafruit Bluefruit LE SPI Friend: Examples, Pinouts, and Specs

Image of Adafruit Bluefruit LE SPI FriendDesign with Adafruit Bluefruit LE SPI Friend in Cirkit Designer

Introduction

The Adafruit Bluefruit LE SPI Friend is a versatile Bluetooth Low Energy (BLE) module that provides wireless communication capabilities to your projects. It is designed to interface with microcontrollers via the Serial Peripheral Interface (SPI) and is capable of acting as either a peripheral or a central BLE device. This module is ideal for adding Bluetooth connectivity to a wide range of applications, such as wearable technology, wireless sensor networks, and IoT devices.

Explore Projects Built with Adafruit Bluefruit LE SPI Friend

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Number Name Description
1 VIN Power supply (3.3V to 5V)
2 GND Ground connection
3 SCK SPI Clock
4 MISO Master In Slave Out (SPI Data from Bluefruit to MCU)
5 MOSI Master Out Slave In (SPI Data from MCU to Bluefruit)
6 CS Chip Select (Active Low)
7 IRQ Interrupt Request (Active Low)
8 RST Reset (Active Low)

Usage Instructions

How to Use the Component in a Circuit

  1. Power Connections: Connect the VIN pin to a 3.3V to 5V power supply and the GND pin to the ground.
  2. SPI Connections: Connect the SCK, MISO, and MOSI pins to the corresponding SPI pins on your microcontroller.
  3. Control Pins: Connect the CS, IRQ, and RST pins to available digital I/O pins on your microcontroller.
  4. Antenna: Ensure the integrated PCB antenna is not obstructed for optimal wireless performance.

Important Considerations and Best Practices

Example Code for Arduino UNO

#include <SPI.h>
#include "Adafruit_BLE_UART.h"

// Create the bluefruit object, using SPI interface
Adafruit_BLE_UART ble(SPI_CS, SPI_IRQ, SPI_RST);

void setup() {
  Serial.begin(9600);
  ble.begin();

  // Set BLE callbacks
  ble.setRxCallback(rxCallback);
  ble.setDisconnectCallback(disconnectCallback);

  // Start advertising for connections
  ble.startAdvertising();
}

void loop() {
  // Poll the module to process incoming data
  ble.poll();
}

// Callback for when data is received
void rxCallback(uint8_t *buffer, uint8_t len) {
  Serial.print(F("Received: "));
  for (uint8_t i = 0; i < len; i++) {
    Serial.print((char)buffer[i]);
  }
  Serial.println();
}

// Callback for when a connection is dropped
void disconnectCallback(void) {
  Serial.println(F("Disconnected!"));
  ble.startAdvertising();
}

Note: Replace SPI_CS, SPI_IRQ, and SPI_RST with the actual pin numbers used for Chip Select, Interrupt Request, and Reset pins, respectively.

Troubleshooting and FAQs

Common Issues Users Might Face

Solutions and Tips for Troubleshooting

FAQs

Q: Can the Bluefruit LE SPI Friend be used with a 5V microcontroller? A: Yes, but ensure that the logic levels for SPI communication are shifted down to 3.3V to avoid damaging the module.

Q: How many devices can the Bluefruit LE SPI Friend connect to at once? A: The module can maintain a single connection as a peripheral device. As a central device, it can theoretically manage multiple connections, but this is limited by memory and processing constraints.

Q: What is the range of the Bluefruit LE SPI Friend? A: The range is typically up to 30 meters (100 feet) in open space, but this can be reduced by obstacles and interference.

Q: How do I update the firmware on the Bluefruit LE SPI Friend? A: Firmware updates can be performed using the Bluefruit LE Connect app available for iOS and Android devices. Instructions are provided in the Adafruit Learning System guides.