I have a Adafruit Feather MO LoRa with the Adafruit Bluefruit Friend SPI breakout. The feather MO series uses the ATSAMD21G18 ARM Cortex M0 processor. I’m successful in connecting to and using to Adafruit’s bluetooth to mobile ios sketches.
The blink example browser has an Adafruit MO and MO Pro option and Adafruit Bluefruit LE. Great! Then there is a section in the code where I think the SPI pins are to be defined - CS, IRQ, RST but it looks like the following:
// define pins (varies per shield/board)
#define BLE_REQ 10
#define BLE_RDY 2
#define BLE_RST 9
What does this translate to?.In other sketches for this board type the options are presented as:
//pins for feather BLE, see adafruit web for details
#define BLUEFRUIT_SPI_CS 10
#define BLUEFRUIT_SPI_IRQ 9
#define BLUEFRUIT_SPI_RST 6
and then it won’t compile because includes are missing in this case it is.
#include "BLESerial.h"
I know how to install libraries. What gives? I’ve read something about if there are more than two then bad things happen - but not sure exactly what that means. Also I had to download BLEPeripheral.h from github because the compiler was crashing on this first and I couldn’t find it in the libraries you distributed.
The above option doesn’t compile.
Then I find this suggestion where minimal code is posted:
This code compiles and can be published to the board. (I entered the authentication code and set the pins) but the serial monitor is blank and when I try to connect the Blynk project to the hardware I get a Can’t connect error in the iphone app.
In the above sketch I also try setting pin 8 to high (needed because it’s a feather LoRa) and also try seeing if there is a serial issue by inserting
#if defined(ARDUINO_SAMD_ZERO) && defined(SERIAL_PORT_USBVIRTUAL)
// Required for Serial on Zero based boards
#define Serial SERIAL_PORT_USBVIRTUAL
#endif
All of these compile and publish. After reset the serial is blank and the iphone will not connect. I can see the Bluefruit Friend SPI breakout is trying (blue light comes on).
I’ve also had some questions about what device to select. I’ve tried both Zero and Generic