[SOLVED] Bluetooth BLE support for Adafruit Feather Bluefruit LE

Ok the great news is that since the adafruit wrapper implements Print and Stream it all “Just Works”! Here is my minimal code:

#include "Adafruit_BLE.h"
#include "Adafruit_BluefruitLE_SPI.h"
#include <BlynkSimpleSerialBLE.h>

//pins for feather BLE, see adafruit web for details
#define BLUEFRUIT_SPI_CS               8
#define BLUEFRUIT_SPI_IRQ              7
#define BLUEFRUIT_SPI_RST              4 

char auth[] = "..."; //Had to reverse engineer this.

Adafruit_BluefruitLE_SPI ble(BLUEFRUIT_SPI_CS, BLUEFRUIT_SPI_IRQ, BLUEFRUIT_SPI_RST);

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

  Blynk.begin(auth, ble);
  ble.begin(true); //true => debug on, you can see bluetooth in the serial monitor.
  ble.factoryReset(); //Optional
  ble.setMode(BLUEFRUIT_MODE_DATA);  
}
  
void loop() {          
      Blynk.run();
}

I’m very pleased :slight_smile:

The odd thing is that the auth code doesn’t reflect that in my project. I had to reverse-engineer the correct auth code by using the debug connection. Also the auth code doesn’t appear to change with the project I’m using, or when I generate a new token!

Overall impressed so far though!

3 Likes