Skip to content

Commit 9800cad

Browse files
Update examples.md
1 parent f69c9ae commit 9800cad

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

docs/examples.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
icon: simple/arduino
33
---
44

5+
!!! attention
6+
7+
All of the examples require the user to enter a key into the serial monitor before the example starts, which triggers the IMU calibration.
8+
9+
!!! attention
10+
11+
The IMU on the Optical Tracking Odometry Sensor includes a gyroscope and accelerometer, which could have an offset. The OTOS performs a quick calibration when it powers up, but it is recommended to perform a more thorough calibration at the start of all your programs.
12+
513
###Example 1: Basic Readings
614

715
This first example just does some basic measurements to make sure everything is hooked up correctly. To find Example 1, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example1_BasicReadings**:
@@ -69,10 +77,17 @@ Make sure you've selected the correct board and port in the Tools menu and then
6977
<figcaption markdown>Example 2 Output</figcaption>
7078
</figure>
7179

80+
Feel free to move the sensor around to see how the coordinates change!
81+
7282

7383
###Example 3: Calibration
7484

75-
The IMU on the Optical Tracking Odometry Sensor includes a gyroscope and accelerometer, which could have an offset. The OTOS performs a quick calibration when it powers up, but it is recommended to perform a more thorough calibration at the start of all your programs.
85+
!!! warning
86+
87+
As of firmware version 1.0, these calibration values will be lost after a power cycle, so you will need to set them each time you power up the sensor.
88+
89+
90+
The data from the OTOS will likely have minor scaling errors that can be calibrated out. This is especially important for the angular scalar, because an incorrect angle measurement causes the linear measurements to be rotated by the wrong angle in the firmware, which can lead to very inaccurate tracking!
7691

7792
To find Example 3, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example3_Calibration**:
7893

@@ -118,11 +133,13 @@ To calibrate the linear scalar, move the robot a known distance and measure the
118133

119134
###Example 4: SetOffsetAndPosition
120135

121-
This example shows how to set the offset for the sensor relative to the center of the robot. The units default to inches and degrees, but if you want to use different units, make sure you specify them before setting the offset.
136+
This example shows how to set the offset for the sensor relative to the center of the robot. The units default to inches and degrees, but if you want to use different units, make sure you specify them before setting the offset. Without setting the offset, the OTOS will report the coordinates of itself. If the offset is set, the OTOS will instead report the coordinates of the center of your robot.
137+
138+
Note that the OTOS typically starts tracking from the origin, but if your robot starts at some other location, or you have another source of location information from another sensor that's more accurate, you can send the current location to the OTOS and it will continue tracking from there.
122139

123140
!!! warning
124141

125-
Note that as of firmware version 1.0, these values will be lost after a power cycle, so you will need to set them each time you power up the sensor.
142+
As of firmware version 1.0, these values will be lost after a power cycle, so you will need to set them each time you power up the sensor.
126143

127144

128145
To find Example 4, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example4_SetOffsetAndPosition**:
@@ -154,6 +171,9 @@ If the sensor is mounted 5 inches to the left (negative X) and 10 inches forward
154171

155172

156173

174+
175+
176+
157177
<!--
158178
###Example 5: VelocityAndAcceleration
159179

0 commit comments

Comments
 (0)