Skip to content

Commit a270ec6

Browse files
authored
Merge pull request #477 from arduino/martab1994-patch-2
Update content.md
2 parents 7b6f153 + ca2a526 commit a270ec6

File tree

1 file changed

+24
-24
lines changed
  • content/hardware/05.nicla/boards/nicla-sense-me/tutorials/cli-tool

1 file changed

+24
-24
lines changed

content/hardware/05.nicla/boards/nicla-sense-me/tutorials/cli-tool/content.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,38 +38,38 @@ It is possible to configure the Nicla Sense ME to communicate via Serial over US
3838
- BHY-CONTROLLER tool
3939
- MKR Board (Only required for DFU)
4040

41-
***The bhy-controller tool can be downloaded from https://github.com/arduino/nicla-sense-me-fw while the libraries can be obtained via library manager in the Arduino IDE / CLI.***
41+
***The bhy-controller tool can be downloaded from https://github.com/arduino/nicla-sense-me-fw, while the libraries can be obtained via library manager in the Arduino IDE / CLI.***
4242

4343
## Instructions
4444

4545
### Building the Bhy-Controller Tool Manually
4646

47-
Bhy-Controller is a tool which allows us to configure the Nicla Sense ME sensors through the terminal console and read their values. We will use the "Go" compiler to create the **bhy-controller** CLI tool.
47+
Bhy-Controller is a tool which allows you to configure the Nicla Sense ME sensors through the terminal console and read their values. You will use the "Go" compiler to create the **bhy-controller** CLI tool.
4848

49-
First, please go to [Go's download page](https://golang.org/dl/) and follow the instructions depending on your OS. Then check that you have "go" in your environment variable **PATH**. We need the bhy-controller folder for the next step, it can be found [here](https://github.com/arduino/nicla-sense-me-fw), remember where you extract this folder, we will need to navigate to it in the next step. Now open a terminal console and open the directory **tools/bhy-controller/src** and type `go build bhy.go`, after that you will see a new file called **bhy** (.exe if you are on Windows).
49+
First, please go to [Go's download page](https://golang.org/dl/) and follow the instructions depending on your OS. Then check that you have "go" in your environment variable **PATH**.You need the bhy-controller folder for the next step, it can be found [here](https://github.com/arduino/nicla-sense-me-fw). Remember where you extract this folder, you will need to navigate to it in the next step. Now open a terminal console and open the directory **tools/bhy-controller/src** and type `go build bhy.go`. After that you will see a new file called **bhy** (.exe if you are on Windows).
5050

5151

5252
### Set up the Board
5353

54-
First we need to download the library **Arduino_BHY2** in the Arduino IDE. Next we need to upload the **App.ino** example sketch inside the library. This sketch can be found in: **Examples > Arduino_BHY2 > App.ino**. Select the sketch and upload it to your board.
54+
First, you need to download the library **Arduino_BHY2** in the Arduino IDE. Next, you need to upload the **App.ino** example sketch inside the library. This sketch can be found in: **Examples > Arduino_BHY2 > App.ino**. Select the sketch and upload it to your board.
5555

5656
### Use the Bhy-Controller
5757

58-
Open your terminal console and open the directory **tools/bhy-controller/src** where we already built the bhy program tool(bhy.exe on windows).
58+
Open your terminal console and open the directory **tools/bhy-controller/src** where you already built the bhy program tool(bhy.exe on windows).
5959

60-
Now to use the tool, the basic **syntax** is introducing the name of the program, `bhy`, followed by the command we want to use, plus its arguments.
60+
Now, to use the tool, the basic **syntax** is introducing the name of the program, `bhy`, followed by the command you want to use, plus its arguments.
6161

62-
Once the board is set up and connected we can verify it by using the command:
62+
Once the board is set up and connected, you can verify it by using the command:
6363

6464
```arduino
6565
bhy list
6666
```
6767

68-
Where `bhy` is the program and `list` is the command. This command will print the list of devices connected to the serial ports. After checking that the program works and the Nicla is connected, to configure and read the sensors data we have 2 options: using a WebAPP or the CLI.
68+
Where `bhy` is the program and `list` is the command. This command will print the list of devices connected to the serial ports. After checking that the program works and the Nicla is connected, you need to configure and start reading the sensors data. You have 2 options: using a Web App or the CLI.
6969

7070
### Running the Web App
7171

72-
When we run the Web application we are going to connect through Bluetooth® to the Nicla Sense ME and we will configure the sensors inside the browser. This application is going to use WebBLE from your browser.
72+
When you run the Web application, you are going to connect through Bluetooth® to the Nicla Sense ME and you will configure the sensors inside the browser. This application is going to use WebBLE from your browser.
7373

7474
***For this feature to work, make sure that WebBLE is both supported and enabled! In Google Chrome go to [chrome://flags]() and enable "Experimental Web Platform features". [Check the browser list](https://developer.mozilla.org/en-US/docs/Web/API/Web_Bluetooth_API#browser_compatibility) to confirm that your browser has this feature.***
7575

@@ -84,9 +84,9 @@ This will start a local server hosted at <[localhost:8000](localhost:8000)>
8484
Click the button "Open sensor page" and you will see:
8585
![Sensor page in the browser](assets/web-ble-unpaired.png)
8686

87-
To pair your Nicla Sense ME, first make sure you have uploaded the **App.ino** from the examples. Then click on the **connect** button, if the WebBLE is configured a window will open that will ask you to allow/block the access to Bluetooth®. Now select the Nicla Sense ME device on the list, if the connection succeeded, the current status will change to **connected** and it will turn green.
87+
To pair your Nicla Sense ME, first make sure you have uploaded the **App.ino** from the examples. Then click on the **connect** button; if the WebBLE is configured, a window will open that will ask you to allow/block the access to Bluetooth®. Now select the Nicla Sense ME device on the list; if the connection succeeded, the current status will change to **connected** and it will turn green.
8888

89-
Now you need to configure the sensors you want to get the data from, check the [Nicla Sense ME Cheat sheet sensor IDs](https://docs.arduino.cc/tutorials/nicla-sense-me/cheat-sheet#sensor-ids) for the ID number of the desired sensor.
89+
Now you need to configure the sensors you want to get data from. Check the [Nicla Sense ME Cheat sheet sensor IDs](https://docs.arduino.cc/tutorials/nicla-sense-me/cheat-sheet#sensor-ids) for the ID number of the desired sensor.
9090

9191
To configure the sensor and get the data, enter the sensor ID, e.g Gyroscope is #10. Entering a sample rate that is greater than 0 will enable the sensor. Now press the **configure** button, it will be visible in the table below, as shown in the image.
9292

@@ -95,50 +95,50 @@ To configure the sensor and get the data, enter the sensor ID, e.g Gyroscope is
9595
### Configure a Sensor with CLI Commands
9696

9797
### Enable
98-
We can set the rate and the latency of each sensor, please check the [Nicla Sense ME Cheat sheet sensor IDs](https://docs.arduino.cc/tutorials/nicla-sense-me/cheat-sheet#sensor-ids) to configure the right one.
98+
You can set the rate and the latency of each sensor, please check the [Nicla Sense ME Cheat sheet sensor IDs](https://docs.arduino.cc/tutorials/nicla-sense-me/cheat-sheet#sensor-ids) to configure the right one.
9999

100100
The syntax for configuring a sensor is:
101101

102102
`bhy sensor config -p <YourCOMPort> -sensor <SENSORID> -rate <RATE> -latency <LATENCY>`
103103

104-
For example if we want to configure the **Gyroscope passthrough** which has the sensor ID #**10** connected on the port `COM01` with a rate of 1Hz and a latency of 0ms we would enter:
104+
For example, if you want to configure the **Gyroscope passthrough** which has the sensor ID #**10** connected on the port `COM01` with a rate of 1Hz and a latency of 0ms, you will enter:
105105

106106
`bhy sensor config -p /dev/ttyACM2 -sensor 10 -rate 1 -latency 0`
107107

108-
Now it's configured to output the reading every second (1Hz).
108+
Now it is configured to output the reading every second (1Hz).
109109

110110
### Disable
111-
If we set the latency and rate to **0** the sensor will be disabled and it will not output any data.
111+
If you set the latency and rate to **0**, the sensor will be disabled and it will not output any data.
112112

113113
`bhy sensor config -p <YourCOMPort> -sensor <SENSORID> -rate 0 -latency 0`
114114

115115
### Read Data From a Sensor
116-
If we want to read data from a sensor and print it once, we use:
116+
If you want to read data from a sensor and print it once, you can use:
117117

118118
`bhy sensor read -p <YourCOMPort>`
119119

120-
To do it continuously we add the parameter `-live`
120+
To do it continuously, you can add the parameter `-live`
121121

122122
`bhy sensor read -live -p <YourCOMPort>`
123123

124124
## Using a Passthrough Board with CLI
125-
When we have a firmware for the BHI module or a sketch for the MCU already compiled in a **.bin** file, we can upload them through a MKR or Portenta board directly using the terminal. We need to upload a passthrough sketch to the MKR or Portenta board. Allowing the Nicla to communicate with the computer through the host board. The sketch can be found at **Examples > Arduino_BHY_HOST > Passthrough.ino**.
125+
When you have a firmware for the BHI module or a sketch for the MCU already compiled in a **.bin** file, you can upload them through a MKR or Portenta board directly using the terminal. You need to upload a passthrough sketch to the MKR or Portenta board, allowing the Nicla to communicate with the computer through the host board. The sketch can be found at **Examples > Arduino_BHY_HOST > Passthrough.ino**.
126126

127-
We then need to connect the Nicla board to the desired passthrough board with an Eslov cable, or we can mount the Nicla onto the board as a shield. If you wish to mount the Nicla as a shield, take a look at this [tutorial.](./use-as-mkr-shield) Now that we have everything set up, we can use the commands below to upload firmware or a sketch, if they are in the right format.
127+
You then need to connect the Nicla board to the desired passthrough board either with an Eslov cable or you can mount the Nicla onto the board as a shield. If you wish to mount the Nicla as a shield, take a look at this [tutorial.](./use-as-mkr-shield) Now that you have everything set up, you can use the commands below to upload the firmware or a sketch if they are in the right format.
128128

129129
### Upload a Sketch
130-
Syntax for uploading sketch:
130+
Syntax for uploading a sketch:
131131

132132
`bhy dfu -t nicla -bin <CompiledSketch.bin> -p <MKRBoardCOMPort>`
133133

134-
### Updating Firmware
135-
Syntax for uploading firmware:
134+
### Updating the Firmware
135+
Syntax for uploading the firmware:
136136

137137
`bhy dfu -t bhi -bin <CompiledFirmware.bin> -p <MKRBoardCOMPort>`
138138

139139

140140
## Conclusion
141141

142-
This tutorial shows how to set up the board so it can communicate with both the **Web Application** and the **CLI**.
142+
This tutorial shows how to set up the board to communicate with both the **Web Application** and the **CLI**.
143143

144-
You also learned the commands to configure, get data from the board with the Web Application and the CLI. We also went through how to launch the Web Application from your terminal.
144+
You also learned the commands to configure and get data from the board with the Web Application and the CLI. You also went through how to launch the Web Application from your terminal.

0 commit comments

Comments
 (0)