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/cli-tool/content.md
+24-24Lines changed: 24 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -38,38 +38,38 @@ It is possible to configure the Nicla Sense ME to communicate via Serial over US
38
38
- BHY-CONTROLLER tool
39
39
- MKR Board (Only required for DFU)
40
40
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.***
42
42
43
43
## Instructions
44
44
45
45
### Building the Bhy-Controller Tool Manually
46
46
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.
48
48
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).
50
50
51
51
52
52
### Set up the Board
53
53
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.
55
55
56
56
### Use the Bhy-Controller
57
57
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).
59
59
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.
61
61
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:
63
63
64
64
```arduino
65
65
bhy list
66
66
```
67
67
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.
69
69
70
70
### Running the Web App
71
71
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.
73
73
74
74
***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.***
75
75
@@ -84,9 +84,9 @@ This will start a local server hosted at <[localhost:8000](localhost:8000)>
84
84
Click the button "Open sensor page" and you will see:
85
85

86
86
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.
88
88
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.
90
90
91
91
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.
92
92
@@ -95,50 +95,50 @@ To configure the sensor and get the data, enter the sensor ID, e.g Gyroscope is
95
95
### Configure a Sensor with CLI Commands
96
96
97
97
### 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.
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:
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:
117
117
118
118
`bhy sensor read -p <YourCOMPort>`
119
119
120
-
To do it continuously we add the parameter `-live`
120
+
To do it continuously, you can add the parameter `-live`
121
121
122
122
`bhy sensor read -live -p <YourCOMPort>`
123
123
124
124
## 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**.
126
126
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.
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**.
143
143
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