The Adafruit Feather M0 Bluefruit LE is a compact, powerful microcontroller equipped with Bluetooth Low Energy (LE) for wireless communication. It is designed around the ATSAMD21G18 ARM Cortex M0+ processor, which operates at 48MHz. This board is ideal for a variety of projects, including IoT devices, wearable technology, and smart home applications. Its compatibility with the Arduino IDE allows for a familiar programming environment, making it accessible for both beginners and experienced developers.
Pin Number | Function | Description |
---|---|---|
1 | GND | Ground |
2 | BAT | Battery positive voltage (3.7-6V) |
3 | EN | Enable pin for the regulator |
4 | USB | USB positive voltage (5V from USB port) |
5-14 | D0-D9 | Digital pins, PWM capable (D5, D6, D9) |
15-20 | A0-A5 | Analog input pins |
21 | AREF | Analog reference voltage |
22 | SCK | SPI clock |
23 | MO | SPI master out, slave in |
24 | MI | SPI master in, slave out |
25 | RX | UART receive pin |
26 | TX | UART transmit pin |
27 | SDA | I2C data line |
28 | SCL | I2C clock line |
29 | RST | Reset pin |
30 | 3V3 | 3.3V output from the regulator |
Q: Can I use the Feather M0 Bluefruit LE with Arduino shields? A: Yes, it is compatible with FeatherWing shields designed for the Feather form factor.
Q: How do I update the Bluetooth module's firmware? A: Follow Adafruit's guide on updating the Bluefruit module using the Bluefruit LE Connect app.
Q: What is the maximum Bluetooth range? A: The typical range is up to 10 meters (33 feet), but it can vary based on environmental factors.
#include <Adafruit_BLE.h>
#include <Adafruit_BluefruitLE_SPI.h>
// Define the pins for the SPI connection
#define BLUEFRUIT_SPI_CS 8
#define BLUEFRUIT_SPI_IRQ 7
#define BLUEFRUIT_SPI_RST 4 // Optional but recommended, set to -1 if unused
// Create the bluefruit object
Adafruit_BluefruitLE_SPI ble(BLUEFRUIT_SPI_CS, BLUEFRUIT_SPI_IRQ, BLUEFRUIT_SPI_RST);
void setup() {
Serial.begin(115200);
Serial.println(F("Adafruit Bluefruit Feather M0 Example"));
Serial.println(F("Initializing..."));
// Initialise the module
ble.begin();
// Perform a factory reset to make sure everything is in a known state
ble.factoryReset();
// Set the device name
ble.sendCommandCheckOK(F("AT+GAPDEVNAME=Feather M0"));
}
void loop() {
// Placeholder for code to run repeatedly
}
Note: This example assumes you are using the Adafruit BluefruitLE SPI library. Ensure you have installed the necessary libraries through the Arduino Library Manager before compiling.