Datasheet
For software serial (Arduino Uno, Adafruit Metro) you should uncomment the software serial
contructor below, and make sure the other three options (hardware serial & SPI) are
commented out.
For boards that require hardware serial (Adafruit Flora, etc.), uncomment the hardware serial
constructor, and make sure the other three options are commented out
SPI Based Boards (Bluefruit LE SPI Friend)
For SPI based boards, you should uncomment the hardware SPI constructor below, making
sure the other constructors are commented out:
If for some reason you can't use HW SPI, you can switch to software mode to bit-bang the SPI
transfers via the following constructor:
// Create the bluefruit object, either software serial...uncomment these lines
SoftwareSerial bluefruitSS = SoftwareSerial(BLUEFRUIT_SWUART_TXD_PIN, BLUEFRUIT_SWUART_RXD_PIN
Adafruit_BluefruitLE_UART ble(bluefruitSS, BLUEFRUIT_UART_MODE_PIN,
BLUEFRUIT_UART_CTS_PIN, BLUEFRUIT_UART_RTS_PIN);
/* ...or hardware serial, which does not need the RTS/CTS pins. Uncomment this line */
Adafruit_BluefruitLE_UART ble(BLUEFRUIT_HWSERIAL_NAME, BLUEFRUIT_UART_MODE_PIN);
/* ...hardware SPI, using SCK/MOSI/MISO hardware SPI pins and then user selected CS/IRQ/RST */
Adafruit_BluefruitLE_SPI ble(BLUEFRUIT_SPI_CS, BLUEFRUIT_SPI_IRQ, BLUEFRUIT_SPI_RST
/* ...software SPI, using SCK/MOSI/MISO user-defined SPI pins and then user selected CS/IRQ/RST */
Adafruit_BluefruitLE_SPI ble(BLUEFRUIT_SPI_SCK, BLUEFRUIT_SPI_MISO,
BLUEFRUIT_SPI_MOSI, BLUEFRUIT_SPI_CS,
BLUEFRUIT_SPI_IRQ, BLUEFRUIT_SPI_RST);
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m0-bluefruit-le Page 70 of 238










