|
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-IDB05A2 or the X-NUCLEO-IDB05A1 or the X-NUCLEO-BNRG2A1 |
| 8 | + - STEVAL-MKBOXPRO, STEVAL-MKSBOX1V1, B-L475E-IOT01A1, B_L4S5I_IOT01A, or a Nucleo board plus the X-NUCLEO-IDB05A2 or 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 |
|
15 | 15 | */ |
16 | 16 | #include <STM32duinoBLE.h> |
17 | 17 |
|
18 | | -#if defined(ARDUINO_STEVAL_MKSBOX1V1) |
| 18 | +#if defined(ARDUINO_STEVAL_MKBOXPRO) |
| 19 | +/* STEVAL-MKBOXPRO */ |
| 20 | +SPIClass SpiHCI(PA7, PA6, PA5); |
| 21 | +HCISpiTransportClass HCISpiTransport(SpiHCI, BLUENRG_LP, PA2, PB11, PD4, 1000000, SPI_MODE3); |
| 22 | +#if !defined(FAKE_BLELOCALDEVICE) |
| 23 | +BLELocalDevice BLEObj(&HCISpiTransport); |
| 24 | +BLELocalDevice& BLE = BLEObj; |
| 25 | +#endif |
| 26 | +const int buttonPin = PC13; // set buttonPin to digital pin PC13 |
| 27 | +#elif defined(ARDUINO_STEVAL_MKSBOX1V1) |
19 | 28 | /* STEVAL-MKSBOX1V1 */ |
20 | 29 | SPIClass SpiHCI(PC3, PD3, PD1); |
21 | 30 | HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_1S, PD0, PD4, PA8, 1000000, SPI_MODE1); |
|
0 commit comments