|
1 | 1 | /** |
2 | 2 | * 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. |
7 | 10 | * On many Arduino boards the serial interface associated with those pins is Serial1. |
8 | 11 | * Please check the documentation of your board to find out which serial interface to use. |
9 | 12 | * |
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: |
12 | 16 | * |
13 | 17 | * 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. |
17 | 24 | * |
18 | 25 | * Initial author: Sebastian Romero (s.romero@arduino.cc) |
19 | 26 | * |
|
0 commit comments