The Adafruit Bluefruit LE Shield is a versatile Bluetooth Low Energy (BLE) module designed for seamless integration with Arduino boards. This shield enables wireless communication between an Arduino and Bluetooth-enabled devices such as smartphones, tablets, and computers. It is ideal for a variety of applications, including wireless data transfer, remote control projects, and IoT (Internet of Things) implementations. The shield operates as either a BLE server (peripheral) or client (central), providing flexibility in designing BLE applications.
Pin Number | Function | Description |
---|---|---|
0 (RX) | UART Receive | Used for UART communication with Arduino |
1 (TX) | UART Transmit | Used for UART communication with Arduino |
2 | Mode | Selects between DATA and COMMAND mode |
3 | Factory Reset | Resets the module to factory settings |
4 | Optional IRQ | Interrupt request, active low |
9 | Optional CTS | Clear to Send, active low |
10 | SPI Chip Select | Used when communicating via SPI |
11 | SPI MOSI | Master Out Slave In for SPI communication |
12 | SPI MISO | Master In Slave Out for SPI communication |
13 | SPI SCK | Serial Clock for SPI communication |
A4 | I2C SDA | I2C Data line |
A5 | I2C SCL | I2C Clock line |
Below is a simple example of how to use the Adafruit Bluefruit LE Shield with an Arduino UNO for UART communication:
#include <SoftwareSerial.h>
SoftwareSerial bluefruit(0, 1); // RX, TX
void setup() {
// Start the serial communication with the shield
bluefruit.begin(9600);
Serial.begin(9600);
Serial.println("Adafruit Bluefruit LE Shield ready");
}
void loop() {
// Check if data is available to read from the BLE shield
if (bluefruit.available()) {
char c = bluefruit.read();
Serial.print(c);
}
// Check if data is available to send to the BLE shield
if (Serial.available()) {
char c = Serial.read();
bluefruit.write(c);
}
}
Note: This example uses the SoftwareSerial
library to create a serial connection on pins 0 and 1. Adjust the pin numbers as needed for your specific setup.
Q: Can I use the Adafruit Bluefruit LE Shield with other Arduino boards? A: Yes, the shield is compatible with most Arduino boards that support the required communication protocols (UART, SPI, I2C).
Q: How do I change the shield's baud rate? A: You can change the baud rate using AT commands in COMMAND mode. Refer to the Adafruit Bluefruit LE Shield documentation for specific commands.
Q: Can the shield be used for BLE central and peripheral roles? A: Yes, the shield can function in both central and peripheral roles, allowing it to initiate connections and accept incoming connections.
For more detailed information and advanced usage, refer to the official Adafruit Bluefruit LE Shield documentation and resources available on the Adafruit website.