|
6 | 6 | represents the state of the button.
|
7 | 7 |
|
8 | 8 | The circuit:
|
9 |
| - - 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 | + - 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 |
10 | 10 |
|
11 | 11 | You can use a generic BLE central app, like LightBlue (iOS and Android) or
|
12 | 12 | nRF Connect (Android), to interact with the services and characteristics
|
|
17 | 17 |
|
18 | 18 | #include <STM32duinoBLE.h>
|
19 | 19 |
|
20 |
| -#if defined(ARDUINO_STEVAL_MKSBOX1V1) |
| 20 | +#if defined(ARDUINO_STEVAL_MKBOXPRO) |
| 21 | +/* STEVAL-MKBOXPRO */ |
| 22 | +SPIClass SpiHCI(PA7, PA6, PA5); |
| 23 | +HCISpiTransportClass HCISpiTransport(SpiHCI, BLUENRG_LP, PA2, PB11, PD4, 1000000, SPI_MODE3); |
| 24 | +#if !defined(FAKE_BLELOCALDEVICE) |
| 25 | +BLELocalDevice BLEObj(&HCISpiTransport); |
| 26 | +BLELocalDevice& BLE = BLEObj; |
| 27 | +#endif |
| 28 | +const int buttonPin = PC13; // set buttonPin to digital pin PC13 |
| 29 | +#elif defined(ARDUINO_STEVAL_MKSBOX1V1) |
21 | 30 | /* STEVAL-MKSBOX1V1 */
|
22 | 31 | SPIClass SpiHCI(PC3, PD3, PD1);
|
23 | 32 | HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_1S, PD0, PD4, PA8, 1000000, SPI_MODE1);
|
|
0 commit comments