Datasheet
Common settings:
You can set up how much RAM to set aside for a communication buffer and whether you want to have full debug
output. Debug output is 'noisy' on the serial console but is handy since you can see all communication between the
micro and the BLE
// ----------------------------------------------------------------------------------------------
// These settings are used in both SW UART, HW UART and SPI mode
// ----------------------------------------------------------------------------------------------
#define BUFSIZE 128 // Size of the read buffer for incoming data
#define VERBOSE_MODE true // If set to 'true' enables debug output
Software UART
If you are using Software UART, you can set up which pins are going to be used for RX, TX, and CTS flow control. Some
microcontrollers are limited on which pins can be used! Check the SoftwareSerial library documentation for more
details
// SOFTWARE UART SETTINGS
#define BLUEFRUIT_SWUART_RXD_PIN 9 // Required for software serial!
#define BLUEFRUIT_SWUART_TXD_PIN 10 // Required for software serial!
#define BLUEFRUIT_UART_CTS_PIN 11 // Required for software serial!
#define BLUEFRUIT_UART_RTS_PIN -1 // Optional, set to -1 if unused
Hardware UART
If you have Hardware Serial, there's a 'name' for it, usually Serial1 - you can set that up here:
// HARDWARE UART SETTINGS
#ifdef Serial1 // this makes it not complain on compilation if there's no Serial1
#define BLUEFRUIT_HWSERIAL_NAME Serial1
#endif
Mode Pin
For both hardware and software serial, you will likely want to define the MODE pin. There's a few sketches that dont
use it, instead depending on commands to set/unset the mode. Its best to use the MODE pin if you have a GPIO to
spare!
#define BLUEFRUIT_UART_MODE_PIN 12 // Set to -1 if unused
SPI Pins
For both Hardware and Software SPI, you'll want to set the CS (chip select) line, IRQ (interrupt request) line and if you
have a pin to spare, RST (Reset)
// SHARED SPI SETTINGS
#define BLUEFRUIT_SPI_CS 8
#define BLUEFRUIT_SPI_IRQ 7
#define BLUEFRUIT_SPI_RST 4 // Optional but recommended, set to -1 if unused
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le Page 50 of 211










