-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
/** | ||
* This example shows how to read data from the UART port on the board. | ||
* It is meant to run on a board only connected through UART to the Nicla Sense Env. | ||
* This requires the Nicla Sense Env to be powered through the VIN pin or through | ||
* the ESLOV connector of a host board. | ||
* You will need to connect the UART pins of the Nicla Sense Env to the UART pins of the board. | ||
* It is meant to run on a board ONLY connected through UART to the Nicla Sense Env. | ||
* Boards that have an available I2C interface can connect to the Nicla Sense Env over I2C and read the data | ||
* in a much more efficient way. | ||
* | ||
* A UART-only scenario requires the Nicla Sense Env to be powered through the VIN pin | ||
* as it won't be powered through the ESLOV connector. | ||
* You will need to connect the UART pins of the Nicla Sense Env to the UART pins of the host board. | ||
* On many Arduino boards the serial interface associated with those pins is Serial1. | ||
* Please check the documentation of your board to find out which serial interface to use. | ||
* | ||
* UART output needs to be enabled on the Nicla Sense Env for this example to work. | ||
* You can do so by connecting to the board over I2C to a host board, and running the following code: | ||
* IMPORTANT: UART output needs to be enabled beforehand on the Nicla Sense Env for this example to work. | ||
* You will need an I2C capable board to do so. | ||
* Connect Nicla Sense Env over I2C to that host board, and run the following code: | ||
* | ||
* NiclaSenseEnv device; | ||
* device.begin(); | ||
* The second parameter ensures that the settings are not lost after a reset | ||
* device.setUARTCSVOutputEnabled(true, true); | ||
* device.begin(); | ||
* device.setUARTCSVOutputEnabled(true, true); // Second parameter ensures that the settings are not lost after a reset | ||
* | ||
* After that you can disconnect the Nicla Sense Env from the I2C host board and connect it to the UART host board. | ||
* You won't need to run the above code again, as the settings are stored permanently. | ||
* The code below is meant to run on the UART-only host board once the UART output is enabled. | ||
* | ||
* Initial author: Sebastian Romero ([email protected]) | ||
* | ||
|