Skip to content

Commit ddbdabc

Browse files
committed
Clarify usage of UART mode
1 parent fc7c32b commit ddbdabc

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

Diff for: examples/UARTRead/UARTRead.ino

+16-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
/**
22
* This example shows how to read data from the UART port on the board.
3-
* It is meant to run on a board only connected through UART to the Nicla Sense Env.
4-
* This requires the Nicla Sense Env to be powered through the VIN pin or through
5-
* the ESLOV connector of a host board.
6-
* You will need to connect the UART pins of the Nicla Sense Env to the UART pins of the board.
3+
* It is meant to run on a board ONLY connected through UART to the Nicla Sense Env.
4+
* Boards that have an available I2C interface can connect to the Nicla Sense Env over I2C and read the data
5+
* in a much more efficient way.
6+
*
7+
* A UART-only scenario requires the Nicla Sense Env to be powered through the VIN pin
8+
* as it won't be powered through the ESLOV connector.
9+
* You will need to connect the UART pins of the Nicla Sense Env to the UART pins of the host board.
710
* On many Arduino boards the serial interface associated with those pins is Serial1.
811
* Please check the documentation of your board to find out which serial interface to use.
912
*
10-
* UART output needs to be enabled on the Nicla Sense Env for this example to work.
11-
* You can do so by connecting to the board over I2C to a host board, and running the following code:
13+
* IMPORTANT: UART output needs to be enabled beforehand on the Nicla Sense Env for this example to work.
14+
* You will need an I2C capable board to do so.
15+
* Connect Nicla Sense Env over I2C to that host board, and run the following code:
1216
*
1317
* NiclaSenseEnv device;
14-
* device.begin();
15-
* The second parameter ensures that the settings are not lost after a reset
16-
* device.setUARTCSVOutputEnabled(true, true);
18+
* device.begin();
19+
* device.setUARTCSVOutputEnabled(true, true); // Second parameter ensures that the settings are not lost after a reset
20+
*
21+
* After that you can disconnect the Nicla Sense Env from the I2C host board and connect it to the UART host board.
22+
* You won't need to run the above code again, as the settings are stored permanently.
23+
* The code below is meant to run on the UART-only host board once the UART output is enabled.
1724
*
1825
* Initial author: Sebastian Romero ([email protected])
1926
*

0 commit comments

Comments
 (0)