|
5 | 5 | characteristic to control an LED.
|
6 | 6 |
|
7 | 7 | The circuit:
|
8 |
| - - STEVAL-MKSBOX1V1, B-L475E-IOT01A1, B_L4S5I_IOT01A, or a Nucleo board plus the X-NUCLEO-IDB05A1 or the X-NUCLEO-BNRG2A1 |
| 8 | + - STEVAL-MKSBOX1V1, B-L475E-IOT01A1, or a Nucleo board plus the X-NUCLEO-IDB05A1 or the X-NUCLEO-BNRG2A1 |
9 | 9 |
|
10 | 10 | You can use a generic BLE central app, like LightBlue (iOS and Android) or
|
11 | 11 | nRF Connect (Android), to interact with the services and characteristics
|
|
20 | 20 | SPIClass SpiHCI(PC3, PD3, PD1);
|
21 | 21 | HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_1S, PD0, PD4, PA8, 1000000, SPI_MODE1);
|
22 | 22 | BLELocalDevice BLE(&HCISpiTransport);
|
23 |
| -#elif defined(ARDUINO_DISCO_L475VG_IOT) || defined(ARDUINO_B_L4S5I_IOT01A) |
24 |
| -/* B-L475E-IOT01A1 or B_L4S5I_IOT01A */ |
| 23 | +#elif defined(ARDUINO_DISCO_L475VG_IOT) |
| 24 | +/* B-L475E-IOT01A1 */ |
25 | 25 | SPIClass SpiHCI(PC12, PC11, PC10);
|
26 | 26 | HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, SPI_MODE0);
|
27 | 27 | BLELocalDevice BLE(&HCISpiTransport);
|
| 28 | +#elif defined(ARDUINO_PNUCLEO_WB55RG) |
| 29 | +/* PNUCLEO_WB55RG */ |
| 30 | +HCISharedMemTransportClass HCISharedMemTransport(BLE5_0); |
| 31 | +BLELocalDevice BLE(&HCISharedMemTransport); |
28 | 32 | #else
|
29 | 33 | /* Shield IDB05A1 with SPI clock on D3 */
|
30 | 34 | SPIClass SpiHCI(D11, D12, D3);
|
@@ -52,6 +56,8 @@ BLEByteCharacteristic switchCharacteristic("19B10001-E8F2-537E-4F6C-D104768A1214
|
52 | 56 | const int ledPin = LED_BUILTIN; // pin to use for the LED
|
53 | 57 |
|
54 | 58 | void setup() {
|
| 59 | + |
| 60 | + BLE.debug(Serial); |
55 | 61 | Serial.begin(115200);
|
56 | 62 | while (!Serial);
|
57 | 63 |
|
|
0 commit comments