1 /*==================================================================================================
4 * If you are using an Arduino 101, you do not need to make any changes to this file (unless you
5 * need a unique ble local name (see below). If you are using another supported BLE board or shield,
6 * follow the instructions for the specific board or shield below.
8 * Make sure you have the Intel Curie Boards package v1.0.6 or higher installed via the Arduino
11 * Supported boards and shields:
12 * - Arduino 101 (recommended)
13 * - RedBearLab BLE Shield (v2) ** to be verified **
14 * - RedBearLab BLE Nano ** works with modifications **
16 *================================================================================================*/
18 // change this to a unique name per board if running StandardFirmataBLE on multiple boards
19 // within the same physical space
20 #define FIRMATA_BLE_LOCAL_NAME "FIRMATA"
23 * RedBearLab BLE Shield
25 * If you are using a RedBearLab BLE shield, uncomment the define below.
26 * Also, change the define for BLE_RST if you have the jumper set to pin 7 rather than pin 4.
28 * You will need to use the shield with an Arduino Zero, Due, Mega, or other board with sufficient
29 * Flash and RAM. Arduino Uno, Leonardo and other ATmega328p and Atmega32u4 boards to not have
30 * enough memory to run StandardFirmataBLE.
32 * TODO: verify if this works and with which boards it works.
34 * Test script: https://gist.github.com/soundanalogous/927360b797574ed50e27
36 //#define REDBEAR_BLE_SHIELD
38 #ifdef REDBEAR_BLE_SHIELD
40 #include <BLEPeripheral.h>
41 #include "utility/BLEStream.h"
45 #define BLE_RST 4 // 4 or 7 via jumper on shield
47 BLEStream stream(BLE_REQ, BLE_RDY, BLE_RST);
51 /*==================================================================================================
52 * END BLE CONFIGURATION - you should not need to change anything below this line
53 *================================================================================================*/
58 * Make sure you have the Intel Curie Boards package v1.0.6 or higher installed via the Arduino
61 * Test script: https://gist.github.com/soundanalogous/927360b797574ed50e27
63 #ifdef _VARIANT_ARDUINO_101_X_
65 #include "utility/BLEStream.h"
71 * RedBearLab BLE Nano (with default switch settings)
73 * Blocked on this issue: https://github.com/RedBearLab/nRF51822-Arduino/issues/46
74 * Works with modifications. See comments at top of the test script referenced below.
75 * When the RBL nRF51822-Arduino library issue is resolved, this should work witout
78 * Test script: https://gist.github.com/soundanalogous/d39bb3eb36333a0906df
80 * Note: If you have changed the solder jumpers on the Nano you may encounter issues since
81 * the pins are currently mapped in Firmata only for the default (factory) jumper settings.
84 // #include <BLEPeripheral.h>
85 // #include "utility/BLEStream.h"
91 * RedBearLab Blend and Blend Micro
93 * StandardFirmataBLE requires too much Flash and RAM to run on the ATmega32u4-based Blend
94 * and Blend Micro boards. It may work with ConfigurableFirmata selecting only analog and/or
97 // #if defined(BLEND_MICRO) || defined(BLEND)
99 // #include <BLEPeripheral.h>
100 // #include "utility/BLEStream.h"
106 // BLEStream stream(BLE_REQ, BLE_RDY, BLE_RST);
110 #if defined(BLE_REQ) && defined(BLE_RDY) && defined(BLE_RST)
111 #define IS_IGNORE_BLE_PINS(p) ((p) == BLE_REQ || (p) == BLE_RDY || (p) == BLE_RST)