Skip to content

Commit 5a39389

Browse files
Stubs for arduino examples
1 parent 4cbda0b commit 5a39389

File tree

3 files changed

+122
-8
lines changed

3 files changed

+122
-8
lines changed

docs/examples.md

Lines changed: 118 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
###Example 1: Basic Readings
22

3-
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** > **Example01_BasicUsage**:
3+
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**:
44

55

66
<figure markdown>
@@ -25,6 +25,18 @@ Make sure you've selected the correct board and port in the Tools menu and then
2525

2626
###Example 2: SetUnits
2727

28+
This example sets the desired units for linear and angular measurements. Can be either meters or inches for linear, and radians or degrees for angular. If not set, the default is inches and degrees. Note that this setting is not stored in the sensor, it's part of the library, so you need to set at the start of all your programs.
29+
30+
To find Example 2, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example2_SetUnits**:
31+
32+
33+
<figure markdown>
34+
[![Optical Tracking Odometry Sensor Arduino Example 2](assets/imgs/Example2_Menu.jpg){ width="90%" }](assets/imgs/Example2_Menu.jpg "Click to enlarge")
35+
<figcaption markdown>Finding Example 2</figcaption>
36+
</figure>
37+
38+
Alternatively, you can expand the link below and copy and paste the code into a shiny new Arduino sketch:
39+
2840
<!--
2941
3042
??? "Example 2 Arduino Code"
@@ -35,6 +47,18 @@ Make sure you've selected the correct board and port in the Tools menu and then
3547

3648
###Example 3: Calibration
3749

50+
The IMU on the OTOS 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.
51+
52+
To find Example 3, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example3_Calibration**:
53+
54+
55+
<figure markdown>
56+
[![Optical Tracking Odometry Sensor Arduino Example 3](assets/imgs/Example3_Menu.jpg){ width="90%" }](assets/imgs/Example3_Menu.jpg "Click to enlarge")
57+
<figcaption markdown>Finding Example 3</figcaption>
58+
</figure>
59+
60+
Alternatively, you can expand the link below and copy and paste the code into a shiny new Arduino sketch:
61+
3862
<!--
3963
4064
??? "Example 3 Arduino Code"
@@ -46,10 +70,103 @@ Make sure you've selected the correct board and port in the Tools menu and then
4670

4771
###Example 4: SetOffsetAndPosition
4872

73+
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.
74+
75+
!!! warning
76+
77+
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.
78+
79+
80+
To find Example 4, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example4_SetOffsetAndPositione**:
81+
82+
83+
<figure markdown>
84+
[![Optical Tracking Odometry Sensor Arduino Example 4](assets/imgs/Example4_Menu.jpg){ width="90%" }](assets/imgs/Example4_Menu.jpg "Click to enlarge")
85+
<figcaption markdown>Finding Example 4</figcaption>
86+
</figure>
87+
88+
Alternatively, you can expand the link below and copy and paste the code into a shiny new Arduino sketch:
89+
4990
<!--
5091
5192
??? "Example 4 Arduino Code"
5293
```
5394
--8<-- ""
5495
```
96+
-->
97+
98+
###Example 5: VelocityAndAcceleration
99+
100+
This example prints out the velocity and acceleration of the bot as it moves.
101+
102+
103+
To find Example 5, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example5_VelocityAndAcceleration**:
104+
105+
106+
<figure markdown>
107+
[![Optical Tracking Odometry Sensor Arduino Example 5](assets/imgs/Example5_Menu.jpg){ width="90%" }](assets/imgs/Example5_Menu.jpg "Click to enlarge")
108+
<figcaption markdown>Finding Example 5</figcaption>
109+
</figure>
110+
111+
Alternatively, you can expand the link below and copy and paste the code into a shiny new Arduino sketch:
112+
113+
<!--
114+
115+
??? "Example 5 Arduino Code"
116+
```
117+
--8<-- ""
118+
```
119+
-->
120+
121+
###Example 6: StandardDeviation
122+
123+
This example reads the standard deviation of the tracking. Note that these values are just the square root of the diagonal elements of the covariance matrices of the Kalman filters used in the firmware of the OTOS and not actual tracking error data.
124+
125+
!!! warning
126+
127+
THESE VALUES DO NOT REPRESENT THE ACTUAL TRACKING ERROR! These are statistical quantities that assume a correct model of the system, but there could be unmodelled error sources that cause the physical error to become larger than these statistical error (eg. improper calibration, or rotating the OTOS to not be flat against the tracking surface). These are provided primarily for anyone wanting to perform sensor fusion with additional sensors, but they can be used to at least "get an idea" of the quality of the accuracy.
128+
129+
130+
131+
To find Example 6, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example6_StandardDeviation**:
132+
133+
134+
<figure markdown>
135+
[![Optical Tracking Odometry Sensor Arduino Example 6](assets/imgs/Example6_Menu.jpg){ width="90%" }](assets/imgs/Example6_Menu.jpg "Click to enlarge")
136+
<figcaption markdown>Finding Example 6</figcaption>
137+
</figure>
138+
139+
Alternatively, you can expand the link below and copy and paste the code into a shiny new Arduino sketch:
140+
141+
<!--
142+
143+
??? "Example 6 Arduino Code"
144+
```
145+
--8<-- ""
146+
```
147+
-->
148+
149+
150+
151+
###Example 7: GetVersion
152+
153+
This should be fairly self explanatory. This example gets the current hardware and firmware version of the board.
154+
155+
156+
To find Example 7, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example7_GetVersion**:
157+
158+
159+
<figure markdown>
160+
[![Optical Tracking Odometry Sensor Arduino Example 7](assets/imgs/Example7_Menu.jpg){ width="90%" }](assets/imgs/Example7_Menu.jpg "Click to enlarge")
161+
<figcaption markdown>Finding Example 7</figcaption>
162+
</figure>
163+
164+
Alternatively, you can expand the link below and copy and paste the code into a shiny new Arduino sketch:
165+
166+
<!--
167+
168+
??? "Example 7 Arduino Code"
169+
```
170+
--8<-- ""
171+
```
55172
-->

docs/hardware_assembly.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ icon: fontawesome/solid/screwdriver-wrench
33
---
44

55

6-
The SparkFun Optical Tracking Odometry Sensor needs to be rigidly mounted to a robot chassis and oriented flat to the floor. We've designed a few 3D printing models you can use, but you may need to design your own mount for this board, depending on your use case.
7-
6+
The SparkFun Optical Tracking Odometry Sensor needs to be rigidly mounted to a robot chassis and oriented flat to the floor. We've designed a few 3D printing models you can use, but you may need to design your own mount for this board, depending on your use case. Accurate readings really require that the sensor is mounted correctly; attempting to move the sensor by hand can work, but tracking accuracy will suffer.
87

98

109
<figure markdown>
@@ -14,10 +13,7 @@ The SparkFun Optical Tracking Odometry Sensor needs to be rigidly mounted to a r
1413

1514

1615
!!! attention
17-
Reminder - make sure you peel off the yellow kapton tape before using this!
18-
19-
16+
Reminder - make sure you peel off the yellow kapton tape!
2017

2118

2219

23-
the sensor really needs to be rigidly mounted to a robot chassis, and oriented flat to the floor. I'm planning on providing a couple 3D printable mount designs that folks can use, but they may need to design their own mount. Also emphasize that the examples really require the sensor to be mounted correctly; attempting to move the sensor by hand can work, but tracking accuracy may be terrible.

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ nav:
254254
- Hardware Overview: hardware_overview.md
255255
- Hardware Assembly: hardware_assembly.md
256256
- Software Setup: software_setup_and_programming.md
257-
- Arduino Examples: examples.md
257+
- Examples:
258+
- Arduino Examples: examples.md
258259
- Resources: resources.md
259260
- Support:
260261
- Troubleshooting: troubleshooting.md

0 commit comments

Comments
 (0)