Skip to content

Commit

Permalink
Adding Visualization Script
Browse files Browse the repository at this point in the history
  • Loading branch information
SparkFun-Documentation-Team committed May 29, 2024
1 parent 8b1340d commit df2ee59
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
Binary file added docs/assets/SparkFun_OTOS_XRP_Visualization.zip
Binary file not shown.
12 changes: 5 additions & 7 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Make sure you've selected the correct board and port in the Tools menu and then
<figcaption markdown>Example 1 Output</figcaption>
</figure>

Move the sensor around to see how the coordinates change!


###Example 2: SetUnits

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.
Expand Down Expand Up @@ -77,13 +80,6 @@ Make sure you've selected the correct board and port in the Tools menu and then
<figcaption markdown>Example 2 Output</figcaption>
</figure>

Move the sensor around to see how the coordinates change!


<figure markdown>
[![Coordinate Changes](assets/img/SEN-24904-Action-GIF-1.gif){ width="600" }](assets/img/SEN-24904-Action-GIF-1.gif "Click to enlarge")
<figcaption markdown>Coordinate Changes</figcaption>
</figure>

###Example 3: Calibration

Expand Down Expand Up @@ -115,6 +111,8 @@ Alternatively, you can expand the link below and copy and paste the code into a
https://raw.githubusercontent.com/sparkfun/SparkFun_Qwiic_OTOS_Arduino_Library/v1.0.0/examples/Example3_Calibration/Example3_Calibration.ino
-->

Make sure you've selected the correct board and port in the Tools menu and then hit the upload button. Once the code has finished uploading, go ahead and open a [Serial Monitor](https://learn.sparkfun.com/tutorials/terminal-basics).

Calibrating your bot requires you to move it around a bit. First, set both scalars to 1.0, then calibrate the angular scalar, then the linear scalar.

To calibrate the angular scalar, spin the robot by multiple rotations (eg. 10) to get a precise error, then set the scalar to the inverse of the error. Remember that the angle wraps from -180 to 180 degrees, so for example, if after 10 rotations counterclockwise(positive rotation), the sensor reports -15 degrees, the required scalar would be 3600/3585 = 1.004.
Expand Down
14 changes: 12 additions & 2 deletions docs/software_setup-Arduino.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
icon: simple/arduino
---

## Arduino

!!! attention
If this is your first time using Arduino, please review our tutorial on [installing the Arduino IDE](https://learn.sparkfun.com/tutorials/installing-arduino-ide). If you have not previously installed an Arduino library, please check out our [installation guide](https://learn.sparkfun.com/tutorials/installing-an-arduino-library).

Expand All @@ -14,3 +12,15 @@ We've written a library to get you started with the SparkFun Optical Tracking Od
</center>


In addition to the library provided here, we have written a Python script that allows you to visualize the XRP in real time. Download via the button below.

<center>
[XRP Visualization Script](assets\SparkFun_OTOS_XRP_Visualization.zip){ .md-button .md-button--primary }
</center>



<figure markdown>
[![Visualization Script in Action](assets/img/SEN-24904-Action-GIF-1.gif){ width="600" }](assets/img/SEN-24904-Action-GIF-1.gif "Click to enlarge")
<figcaption markdown>Visualization Script in Action</figcaption>
</figure>

0 comments on commit df2ee59

Please sign in to comment.