Skip to content

Commit 959fdee

Browse files
committed
Fix typos, autoformat Flight2
1 parent 97ec6f4 commit 959fdee

File tree

2 files changed

+105
-105
lines changed

2 files changed

+105
-105
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ to SensiBLE and see sensors data. The data are also printed to the serial port.
2525
X-NUCLEO-IKS01A2 or X-NUCLEO-IKS01A3, X-NUCLEO-IDB05A1 and X-NUCLEO-53L1A1 Expansion Boards. The application gather data from the sensor mounted and then communicates
2626
them via bluetooth to a suitable Android app (such as ST BLE Sensor). The data gathered include enviromental data (temperature, pression, humidity),
2727
distance, gesture recognition (tap and directional swipe), acceleration (with accelerometer hardware events) and a gyroscope.
28-
* Flight2: This application provides an example of usage of a NUCLEO board (it was tested iwht NUCLEO-F401RE) with
29-
x-NUCLEO-IKS01A3, X-NUCLEO-IDB05A1 and X-NUCLEO-53L1A1 Expansion Boards. The application gathers data from the sensors mounted and then communicates
28+
* Flight2: This application provides an example of usage of a NUCLEO board (it was tested with NUCLEO-F401RE) with
29+
X-NUCLEO-IKS01A3, X-NUCLEO-IDB05A2 and X-NUCLEO-53L1A1 Expansion Boards. The application gathers data from the sensors mounted and then communicates
3030
them via bluetooth to a suitable Android or iOS app (such as ST BLE Sensor). The data gathered include enviromental data (temperature, pression, humidity),
3131
distance, gesture recognition (tap and directional swipe), acceleration (with accelerometer hardware events), a gyroscope and a magnetometer. Note that
32-
unlike the Flight1 application, this one makes use of the ArduinoBLE API instead of SPBTLE, and does not support x-NUCLEO-IKS01A2 boards. In addition, an up-to-date version of the STM32duinoBLE library is required, as this application uses some of the newest features.
32+
unlike the Flight1 application, this one makes use of the STM32duinoBLE API instead of SPBTLE-RF, and does not support X-NUCLEO-IKS01A2 boards. In addition, an up-to-date version of the STM32duinoBLE library is required, as this application uses some of the newest features.
3333
* IKS01A3_S2LP_P2P_Demo: This application provides a simple example of usage of two NUCLEO boards (it was tested with NUCLEO-F401RE and NUCLEO-L053R8)
3434
with a X-NUCLEO-IKS01A3 and one among X-NUCLEO-S2868A1, X-NUCLEO-S2868A2 and X-NUCLEO-S2915A1. It shows how to send and receive all the sensor data
3535
provided by the X-NUCLEO-IKS01A3 between two NUCLEO boards connected each other through S2-LP based Expansion Boards; in order to send the sensor data

examples/Flight2/Flight2.ino

+102-102
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
/**
22
******************************************************************************
3-
* @file Flight2.ino
4-
* @author STMicroelectronics
5-
* @version V1.0.0
6-
* @date 15 March 2023
7-
* @brief Arduino demo application for the STMicrolectronics
8-
* X-NUCLEO-IKS01A3, X-NUCLEO-53L1A1
9-
* and X-NUCLEO-IDB05A1
3+
@file Flight2.ino
4+
@author STMicroelectronics
5+
@version V1.0.0
6+
@date 15 March 2023
7+
@brief Arduino demo application for the STMicrolectronics
8+
X-NUCLEO-IKS01A3, X-NUCLEO-53L1A1
9+
and X-NUCLEO-IDB05A1
1010
******************************************************************************
11-
* @attention
12-
*
13-
* <h2><center>&copy; COPYRIGHT(c) 2023 STMicroelectronics</center></h2>
14-
*
15-
* Redistribution and use in source and binary forms, with or without modification,
16-
* are permitted provided that the following conditions are met:
17-
* 1. Redistributions of source code must retain the above copyright notice,
18-
* this list of conditions and the following disclaimer.
19-
* 2. Redistributions in binary form must reproduce the above copyright notice,
20-
* this list of conditions and the following disclaimer in the documentation
21-
* and/or other materials provided with the distribution.
22-
* 3. Neither the name of STMicroelectronics nor the names of its contributors
23-
* may be used to endorse or promote products derived from this software
24-
* without specific prior written permission.
25-
*
26-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
30-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
32-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
34-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36-
*
11+
@attention
12+
13+
<h2><center>&copy; COPYRIGHT(c) 2023 STMicroelectronics</center></h2>
14+
15+
Redistribution and use in source and binary forms, with or without modification,
16+
are permitted provided that the following conditions are met:
17+
1. Redistributions of source code must retain the above copyright notice,
18+
this list of conditions and the following disclaimer.
19+
2. Redistributions in binary form must reproduce the above copyright notice,
20+
this list of conditions and the following disclaimer in the documentation
21+
and/or other materials provided with the distribution.
22+
3. Neither the name of STMicroelectronics nor the names of its contributors
23+
may be used to endorse or promote products derived from this software
24+
without specific prior written permission.
25+
26+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
30+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
32+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
34+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36+
3737
******************************************************************************
38-
*/
38+
*/
3939

4040
// Note: make sure your STM32duinoBLE is updated to the latest version!
4141

@@ -69,78 +69,78 @@
6969

7070
// BLE boards
7171
#if defined(ARDUINO_STEVAL_MKBOXPRO)
72-
/* STEVAL-MKBOXPRO */
73-
SPIClass SpiHCI(PA7, PA6, PA5);
74-
HCISpiTransportClass HCISpiTransport(SpiHCI, BLUENRG_LP, PA2, PB11, PD4, 1000000, SPI_MODE3);
75-
#if !defined(FAKE_BLELOCALDEVICE)
76-
BLELocalDevice BLEObj(&HCISpiTransport);
77-
BLELocalDevice &BLE = BLEObj;
78-
#endif
72+
/* STEVAL-MKBOXPRO */
73+
SPIClass SpiHCI(PA7, PA6, PA5);
74+
HCISpiTransportClass HCISpiTransport(SpiHCI, BLUENRG_LP, PA2, PB11, PD4, 1000000, SPI_MODE3);
75+
#if !defined(FAKE_BLELOCALDEVICE)
76+
BLELocalDevice BLEObj(&HCISpiTransport);
77+
BLELocalDevice &BLE = BLEObj;
78+
#endif
7979
#elif defined(ARDUINO_STEVAL_MKSBOX1V1)
80-
/* STEVAL-MKSBOX1V1 */
81-
SPIClass SpiHCI(PC3, PD3, PD1);
82-
HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_1S, PD0, PD4, PA8, 1000000, SPI_MODE1);
83-
#if !defined(FAKE_BLELOCALDEVICE)
84-
BLELocalDevice BLEObj(&HCISpiTransport);
85-
BLELocalDevice &BLE = BLEObj;
86-
#endif
80+
/* STEVAL-MKSBOX1V1 */
81+
SPIClass SpiHCI(PC3, PD3, PD1);
82+
HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_1S, PD0, PD4, PA8, 1000000, SPI_MODE1);
83+
#if !defined(FAKE_BLELOCALDEVICE)
84+
BLELocalDevice BLEObj(&HCISpiTransport);
85+
BLELocalDevice &BLE = BLEObj;
86+
#endif
8787
#elif defined(ARDUINO_B_L475E_IOT01A) || defined(ARDUINO_B_L4S5I_IOT01A)
88-
/* B-L475E-IOT01A1 or B_L4S5I_IOT01A */
89-
SPIClass SpiHCI(PC12, PC11, PC10);
90-
HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, SPI_MODE0);
91-
#if !defined(FAKE_BLELOCALDEVICE)
92-
BLELocalDevice BLEObj(&HCISpiTransport);
93-
BLELocalDevice &BLE = BLEObj;
94-
#endif
88+
/* B-L475E-IOT01A1 or B_L4S5I_IOT01A */
89+
SPIClass SpiHCI(PC12, PC11, PC10);
90+
HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, SPI_MODE0);
91+
#if !defined(FAKE_BLELOCALDEVICE)
92+
BLELocalDevice BLEObj(&HCISpiTransport);
93+
BLELocalDevice &BLE = BLEObj;
94+
#endif
9595
#elif defined(ARDUINO_NUCLEO_WB15CC) || defined(ARDUINO_P_NUCLEO_WB55RG) || defined(ARDUINO_STM32WB5MM_DK)
96-
HCISharedMemTransportClass HCISharedMemTransport;
97-
#if !defined(FAKE_BLELOCALDEVICE)
98-
BLELocalDevice BLEObj(&HCISharedMemTransport);
99-
BLELocalDevice &BLE = BLEObj;
100-
#endif
96+
HCISharedMemTransportClass HCISharedMemTransport;
97+
#if !defined(FAKE_BLELOCALDEVICE)
98+
BLELocalDevice BLEObj(&HCISharedMemTransport);
99+
BLELocalDevice &BLE = BLEObj;
100+
#endif
101101
#else
102-
/* Shield IDB05A2 with SPI clock on D3 */
103-
SPIClass SpiHCI(D11, D12, D3);
104-
HCISpiTransportClass HCISpiTransport(SpiHCI, BLUENRG_M0, A1, A0, D7, 8000000, SPI_MODE0);
105-
#if !defined(FAKE_BLELOCALDEVICE)
106-
BLELocalDevice BLEObj(&HCISpiTransport);
107-
BLELocalDevice &BLE = BLEObj;
108-
#endif
109-
/* Shield IDB05A2 with SPI clock on D13 */
110-
// #define SpiHCI SPI
111-
// HCISpiTransportClass HCISpiTransport(SpiHCI, BLUENRG_M0, A1, A0, D7, 8000000, SPI_MODE0);
112-
// #if !defined(FAKE_BLELOCALDEVICE)
113-
// BLELocalDevice BLEObj(&HCISpiTransport);
114-
// BLELocalDevice& BLE = BLEObj;
115-
// #endif
116-
/* Shield IDB05A1 with SPI clock on D3 */
117-
// SPIClass SpiHCI(D11, D12, D3);
118-
// HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, A1, A0, D7, 8000000, SPI_MODE0);
119-
// #if !defined(FAKE_BLELOCALDEVICE)
120-
// BLELocalDevice BLEObj(&HCISpiTransport);
121-
// BLELocalDevice& BLE = BLEObj;
122-
// #endif
123-
/* Shield IDB05A1 with SPI clock on D13 */
124-
// #define SpiHCI SPI
125-
// HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, A1, A0, D7, 8000000, SPI_MODE0);
126-
// #if !defined(FAKE_BLELOCALDEVICE)
127-
// BLELocalDevice BLEObj(&HCISpiTransport);
128-
// BLELocalDevice& BLE = BLEObj;
129-
// #endif
130-
/* Shield BNRG2A1 with SPI clock on D3 */
131-
// SPIClass SpiHCI(D11, D12, D3);
132-
// HCISpiTransportClass HCISpiTransport(SpiHCI, BLUENRG_M2SP, A1, A0, D7, 1000000, SPI_MODE1);
133-
// #if !defined(FAKE_BLELOCALDEVICE)
134-
// BLELocalDevice BLEObj(&HCISpiTransport);
135-
// BLELocalDevice& BLE = BLEObj;
136-
// #endif
137-
/* Shield BNRG2A1 with SPI clock on D13 */
138-
// #define SpiHCI SPI
139-
// HCISpiTransportClass HCISpiTransport(SpiHCI, BLUENRG_M2SP, A1, A0, D7, 1000000, SPI_MODE1);
140-
// #if !defined(FAKE_BLELOCALDEVICE)
141-
// BLELocalDevice BLEObj(&HCISpiTransport);
142-
// BLELocalDevice& BLE = BLEObj;
143-
// #endif
102+
/* Shield IDB05A2 with SPI clock on D3 */
103+
SPIClass SpiHCI(D11, D12, D3);
104+
HCISpiTransportClass HCISpiTransport(SpiHCI, BLUENRG_M0, A1, A0, D7, 8000000, SPI_MODE0);
105+
#if !defined(FAKE_BLELOCALDEVICE)
106+
BLELocalDevice BLEObj(&HCISpiTransport);
107+
BLELocalDevice &BLE = BLEObj;
108+
#endif
109+
/* Shield IDB05A2 with SPI clock on D13 */
110+
// #define SpiHCI SPI
111+
// HCISpiTransportClass HCISpiTransport(SpiHCI, BLUENRG_M0, A1, A0, D7, 8000000, SPI_MODE0);
112+
// #if !defined(FAKE_BLELOCALDEVICE)
113+
// BLELocalDevice BLEObj(&HCISpiTransport);
114+
// BLELocalDevice& BLE = BLEObj;
115+
// #endif
116+
/* Shield IDB05A1 with SPI clock on D3 */
117+
// SPIClass SpiHCI(D11, D12, D3);
118+
// HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, A1, A0, D7, 8000000, SPI_MODE0);
119+
// #if !defined(FAKE_BLELOCALDEVICE)
120+
// BLELocalDevice BLEObj(&HCISpiTransport);
121+
// BLELocalDevice& BLE = BLEObj;
122+
// #endif
123+
/* Shield IDB05A1 with SPI clock on D13 */
124+
// #define SpiHCI SPI
125+
// HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, A1, A0, D7, 8000000, SPI_MODE0);
126+
// #if !defined(FAKE_BLELOCALDEVICE)
127+
// BLELocalDevice BLEObj(&HCISpiTransport);
128+
// BLELocalDevice& BLE = BLEObj;
129+
// #endif
130+
/* Shield BNRG2A1 with SPI clock on D3 */
131+
// SPIClass SpiHCI(D11, D12, D3);
132+
// HCISpiTransportClass HCISpiTransport(SpiHCI, BLUENRG_M2SP, A1, A0, D7, 1000000, SPI_MODE1);
133+
// #if !defined(FAKE_BLELOCALDEVICE)
134+
// BLELocalDevice BLEObj(&HCISpiTransport);
135+
// BLELocalDevice& BLE = BLEObj;
136+
// #endif
137+
/* Shield BNRG2A1 with SPI clock on D13 */
138+
// #define SpiHCI SPI
139+
// HCISpiTransportClass HCISpiTransport(SpiHCI, BLUENRG_M2SP, A1, A0, D7, 1000000, SPI_MODE1);
140+
// #if !defined(FAKE_BLELOCALDEVICE)
141+
// BLELocalDevice BLEObj(&HCISpiTransport);
142+
// BLELocalDevice& BLE = BLEObj;
143+
// #endif
144144
#endif
145145

146146
// Interrupts

0 commit comments

Comments
 (0)