You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/05.nicla/boards/nicla-sense-me/tutorials/getting-started/getting-started.md
+23-23Lines changed: 23 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ software:
21
21
22
22
## Introduction
23
23
24
-
This tutorial will show you how to get started with your Nicla Sense ME board and how it can be utilized by itself. It will showcase the boards IMU and other sensors to get readings which we can easily display. We will go through a basic sketch for the Nicla Sense ME and see the potential of the board.
24
+
This tutorial will show you how to get started with your Nicla Sense ME board and how it can be utilized by itself. It will showcase the board's IMU and other sensors to get readings which we can be easily displayed. We will go through a basic sketch for the Nicla Sense ME and see the potential of the board.
25
25
26
26
## Goals
27
27
@@ -39,20 +39,20 @@ The goals of this project are:
39
39
40
40
## Sensors on the Nicla Sense ME
41
41
42
-
The Nicla Sense ME's BHI sensor includes a 6-axis IMU, we will use this IMU to give us accelerometer and gyroscope readings. An accelerometer is an electromechanical device used to measure acceleration forces. Such forces may be static, like the continuous force of gravity or, as is the case with many mobile devices, dynamic to sense movement or vibrations. A gyroscope sensor can measure and maintain the orientation and angular velocity of an object. Gyroscopes are more advanced than accelerometers, as they can measure the tilt and lateral orientation of an object, whereas an accelerometer can only measure its linear motion.
42
+
The Nicla Sense ME's BHI260AP sensor includes a 6-axis IMU, that we will use to give us accelerometer and gyroscope readings. An accelerometer is an electromechanical device used to measure acceleration forces. Such forces may be static, like the continuous force of gravity or, as is the case with many mobile devices, dynamic to sense movements or vibrations. On the other hand, a gyroscope sensor can measure and maintain the orientation and angular velocity of an object. Gyroscopes are more advanced than accelerometers, as they can measure the tilt and lateral orientation of an object, whereas an accelerometer can only measure its linear motion.
43
43
44
44
You can see the full list with all the needed information about the sensors [here](https://docs.arduino.cc/tutorials/nicla-sense-me/cheat-sheet#sensor-ids).
45
45
46
46
### Sensor Types
47
47
48
-
To access the Arduino Nicla Sense ME sensor's data you will need to declare the type of the sensor you want to use (they are called constructors), which have different data functions that return data (e.g Accelerometer will have X, Y and Z values).
48
+
To access the Arduino Nicla Sense ME sensor's data, you will need to declare the type of sensor you want to use (they are called constructors), since they have different data functions that return data (e.g Accelerometer will have X, Y and Z values).
49
49
50
50
The **Arduino_BHY2** library contains these sensors:
51
51
52
52
#### Sensor
53
53
54
-
`value()` - Returns the data, for example if you use the Temperature sensor, it will give you the Temperature reading.
55
-
`toString()` - Prints the value(s) in a String, you can use it to print all the data into the serial monitor.
54
+
`value()` - Returns the data. For example, if you use the Temperature sensor, it will give you the Temperature reading.
55
+
`toString()` - Prints the value(s) in a String. You can use it to print all the data into the Serial Monitor.
56
56
57
57
**Syntax example**
58
58
```arduino
@@ -80,9 +80,9 @@ The **Arduino_BHY2** library contains these sensors:
80
80
81
81
#### SensorXYZ
82
82
83
-
`x()` - gives Xaxis
84
-
`y()` - gives Yaxis
85
-
`z()` - gives Zaxis
83
+
`x()` - gives X-axis
84
+
`y()` - gives Y-axis
85
+
`z()` - gives Z-axis
86
86
87
87
**Syntax example**
88
88
```arduino
@@ -114,9 +114,9 @@ The **Arduino_BHY2** library contains these sensors:
114
114
115
115
#### SensorOrientation
116
116
117
-
`heading()` - returns Zaxis rotation
118
-
`pitch()` - returns Xaxis rotation
119
-
`roll()` - returns Yaxies rotation
117
+
`heading()` - returns Z-axis rotation
118
+
`pitch()` - returns X-axis rotation
119
+
`roll()` - returns Y-axies rotation
120
120
121
121
**Syntax example**
122
122
```arduino
@@ -213,27 +213,27 @@ This are the activities:
213
213
}
214
214
```
215
215
216
-
The Nicla Sense ME also has environmental sensor, we will use this in the sketch to get temperature and gas readings. This sensor is also capable of reading humidity, pressure and volatile organic compound. Making this board ideal for environmental monitoring especially in and around sensitive electronic equipment.
216
+
The Nicla Sense ME also has an environmental sensor (i.e. BME688). We will use this in the sketch to get temperature and gas readings. This sensor is also capable of reading humidity, pressure and volatile organic compound, making this board ideal for environmental monitoring especially in and around sensitive electronic equipment.
217
217
218
-
Next we will go through a sketch that allows us to see the readings from the sensors.
218
+
Next, we will go through a sketch that allows us to see the readings from the sensors.
219
219
220
220
## Instructions
221
221
222
222
### Arduino IDE and Nicla Core
223
223
224
224
Start the Arduino IDE and install the **nicla_mbed** core. If you need help with installing the core for the Nicla Sense ME, please refer to this [guide](/content/software/ide-v1/tutorials/getting-started/cores/arduino-mbed_nicla/).
225
225
226
-
Now we need to add the **Arduino_BHY2** library that contains the example sketch that we want, we can do this through the library manager in the Arduino IDE. After the library is installed you can access the example sketch directly through the IDE. You can find the sketch in **File > Examples > Arduino_BHY2 > Standalone**. Now you can plug in your Nicla Sense ME and upload the sketch.
226
+
Now you need to add the **Arduino_BHY2** library that contains the example sketch that you want. You can do this through the library manager in the Arduino IDE. After the library is installed, you can access the example sketch directly through the IDE. You can find the sketch in **File > Examples > Arduino_BHY2 > Standalone**. At this point you can plug in your Nicla Sense ME and upload the sketch.
227
227
228
228

229
229
230
230
Next we will go through parts of the sketch and explain them.
231
231
232
232
### Programming the Board
233
233
234
-
With this sketch we can get readings from the Nicla Sense ME's sensors. It includes accelerometer, gyroscope and temperature readings. This simple sketch will show how to get these readings, which can be useful for applications of the Nicla Sense ME.
234
+
With this sketch you can get readings from the Nicla Sense ME's sensors. It includes accelerometer, gyroscope and temperature readings. This simple sketch will show how to get these readings.
235
235
236
-
In the setup part of the sketch we first use:
236
+
In the setup part of the sketch you first use:
237
237
238
238
```arduino
239
239
#include "Arduino_BHY2.h"
@@ -243,9 +243,9 @@ In the setup part of the sketch we first use:
243
243
Sensor temp(SENSOR_ID_TEMP);
244
244
Sensor gas(SENSOR_ID_GAS);
245
245
```
246
-
This defines the sensors that we will use later in the sketch. Giving our sensors the `accel`, `gyro`, `temp` and `gas` sensor class names.
246
+
This defines the sensors that you will use later in the sketch. Give your sensors the `accel`, `gyro`, `temp` and `gas` sensor class names.
247
247
248
-
We can then use these variable names when needed in the sketch. The next thing to do is to enable the sensors. We do that with this code that sets the sensors rate and a latency:
248
+
You can then use these variable names when needed in the sketch. The next thing to do is to enable the sensors. You can do that with this code that sets the sensors rate and a latency:
249
249
250
250
```arduino
251
251
accel.begin();
@@ -254,9 +254,9 @@ We can then use these variable names when needed in the sketch. The next thing t
254
254
gas.begin();
255
255
```
256
256
257
-
The library lets us activate the sensors with a simple call of the `begin()` function. Automatically setting the rate and latency of the sensor.
257
+
The library lets you activate the sensors with a simple call of the `begin()` function, automatically setting the rate and latency of the sensor.
258
258
259
-
To print the readings in the serial monitor we use the following code, converting the readings into strings. With the temperature and gas values we limit the output to 4 digits so that it does not clutter the serial monitor.
259
+
To print the readings in the Serial Monitor, you can use the following code, converting the readings into strings. You can limit the output of temperature and gas values to 4 digits so that they do not clutter the Serial Monitor.
@@ -267,14 +267,14 @@ To print the readings in the serial monitor we use the following code, convertin
267
267
268
268
### Running the Sketch
269
269
270
-
After you have uploaded the sketch to the board, open the serial monitor in the Arduino IDE. You should see similar outputs to the ones shown in the image below. Make sure that the baud rate on your serial monitor is set to **115200**.
270
+
After you have uploaded the sketch to the board, open the Serial Monitor in the Arduino IDE. You should see similar outputs to the ones shown in the image below. Make sure that the baud rate on your serial monitor is set to **115200**.
In this sketch we only get the readings of the sensor. A good next step could be to use these readings as parameters to trigger different reactions on the board, with for example the led on the board. Please take a look at our [cheat sheet](/content/hardware/05.nicla/boards/nicla-sense-me/tutorials/cheat-sheet) if you want quick references for the boards features. Take a look at the other tutorials we have for the [Nicla Sense ME](https://docs.arduino.cc/hardware/nicla-sense-me#tutorials) to discover more about this board.
276
+
In this sketch you only get the readings of the sensor. A good next step could be to use these readings as parameters to trigger different reactions on the board, for example on the board LED. Please take a look at our [cheat sheet](/content/hardware/05.nicla/boards/nicla-sense-me/tutorials/cheat-sheet) if you want quick references for the boards features. Test other tutorials we have for the [Nicla Sense ME](https://docs.arduino.cc/hardware/nicla-sense-me#tutorials) to discover more about this board.
277
277
278
278
## Conclusion
279
279
280
-
In this tutorial you learned how to use the Nicla Sense ME on it's own, getting multiple readings from its sensors. Printing the readings in the serial monitor for easy viewing.
280
+
In this tutorial you learned how to use the Nicla Sense ME on its own, getting multiple readings from its sensors, and how to print the readings in the Serial Monitor for easy viewing.
0 commit comments