Skip to content

Commit b69b326

Browse files
authored
Merge pull request #4 from sparkfun/release/version1.1.0
Move Release v 1.1.0 branch to main
2 parents fba7eba + 75b669e commit b69b326

File tree

7 files changed

+296
-219
lines changed

7 files changed

+296
-219
lines changed

README.md

Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,62 @@
1-
SparkFun Optical Tracking Odometry Sensor Arduino Library
2-
========================================
31

2+
![SparkFun Optical Tracking Odometry Sensor - PAA5160E1](docs/images/gh-banner-2025-arduino-OTOS.png "SparkFun Optical Tracking Odometry Sensor - PAA5160E1Sensor")
43

5-
<center><img src="https://cdn.sparkfun.com/assets/parts/2/5/2/0/9/SEN-24904-Optical-Tracking-Odometry-Sensor-Feature_1.jpg" width="600" height="600" alt="SparkFun Optical Tracking Odometry Sensor - PAA5160E1 (Qwiic)"></center>
4+
# SparkFun Optical Tracking Odometry Sensor - PAA5160E1
65

6+
Arduino Library for the SparkFun Optical Tracking Odometry Sensor - PAA5160E1 Sensor
77

8-
[*SparkFun Optical Tracking Odometry Sensor [SEN-24904]*](https://www.sparkfun.com/products/24904)
8+
![License](https://img.shields.io/github/license/sparkfun/SparkFun_Qwiic_OTOS_Arduino_Library)
9+
![Release](https://img.shields.io/github/v/release/sparkfun/SparkFun_Qwiic_OTOS_Arduino_Library)
10+
![Release Date](https://img.shields.io/github/release-date/sparkfun/SparkFun_Qwiic_OTOS_Arduino_Library)
11+
![Documentation - build](https://img.shields.io/github/actions/workflow/status/sparkfun/SparkFun_Qwiic_OTOS_Arduino_Library/build-deploy-ghpages.yml?label=doc%20build)
12+
![Compile - Test](https://img.shields.io/github/actions/workflow/status/sparkfun/SparkFun_Qwiic_OTOS_Arduino_Library/compile-sketch.yml?label=compile%20test)
13+
![GitHub issues](https://img.shields.io/github/issues/sparkfun/SparkFun_Qwiic_OTOS_Arduino_Library)
914

10-
Arduino Library for the SparkFun Optical Tracking Odometry Sensor
1115

12-
Repository Contents
13-
-------------------
16+
The [SparkFun Optical Tracking Odometry Sensor - PAA5160E1 (SEN-24904)](https://www.sparkfun.com/sparkfun-optical-tracking-odometry-sensor-paa5160e1-qwiic.html) empowers you to elevate your robot's navigation capabilities with exceptional precision and streamlined integration. This compact, all-in-one sensor leverages the power of the PAA5160E1 chip from PixArt Imaging Inc., delivering accurate dual-axis motion data across various hard floor surfaces. But that's not all! This sensor boasts a powerful built-in 6-axis Inertial Measurement Unit (IMU) and an onboard microcontroller that performs real-time sensor fusion and tracking algorithms.
1417

15-
* **/documents** - Data sheets, additional product information
16-
* **/examples** - Example code
17-
* **/src** - Source code
18+
Looking for the board that matches this library - pick up a [SparkFun Optical Tracking Odometry Sensor - PAA5160E1 (SEN-24904)](https://www.sparkfun.com/sparkfun-optical-tracking-odometry-sensor-paa5160e1-qwiic.html) at www.sparkfun.com.
1819

19-
Documentation
20-
--------------
21-
* **[GitHub Repo](https://github.com/sparkfun/SparkFun_Optical_Tracking_Odometry_Sensor)** - Hardware repository for the SparkFun Optical Tracking Odometry Sensor
22-
* **[Hookup Guide](https://docs.sparkfun.com/SparkFun_Optical_Tracking_Odometry_Sensor)** - Hookup Guide for the SparkFun Optical Tracking Odometry Sensor
20+
## Functionality
2321

24-
License Information
25-
-------------------
22+
This library provides an interface that enables the following functionality when a SparkFun Optical Tracking Odometry Sensor - PAA5160E1 Sensors:
2623

27-
This product is _**open source**_!
24+
* ***TODO***
25+
*
26+
27+
28+
## General Use
29+
30+
***TODO***
31+
32+
## Examples
33+
34+
The following examples are provided with the library
35+
36+
- [Basic Readings](examples/Example1_BasicReadings/Example1_BasicReadings.ino) - This example demonstrates how to read the position and heading from the SparkFun Qwiic Optical Tracking Odometry Sensor (OTOS).
37+
- [Set Units](examples/Example2_SetUnits/Example2_SetUnits.ino) - This example demonstrates how to change the units of the SparkFun Qwiic Optical Tracking Odometry Sensor (OTOS)..
38+
- [Calibration](examples/Example3_Calibration/Example3_Calibration.ino) - This example demonstrates how to calibrate the SparkFun Qwiic Optical Tracking Odometry Sensor (OTOS)..
39+
- [Set Offset and Position](examples/Example4_SetOffsetAndPosition/Example4_SetOffsetAndPosition.ino) - This example demonstrates how to set the offset and position of the SparkFun Qwiic Optical Tracking Odometry Sensor (OTOS).
40+
-[Velocity and Acceleration](examples/Example5_VelocityAndAcceleration/Example5_VelocityAndAcceleration.ino) - This example demonstrates how to read the velocity and acceleration from the SparkFun Qwiic Optical Tracking Odometry Sensor (OTOS).
41+
- [Standard Deviation](examples/Example6_StandardDeviation/Example6_StandardDeviation.ino) - This example demonstrates how to read the standard deviation of the measurements of the SparkFun Qwiic Optical Tracking Odometry Sensor (OTOS).
42+
- [Get Version](examples/Example7_GetVersion/Example7_GetVersion.ino) - This example demonstrates how to get the hardware and firmware version numbers from the SparkFun Qwiic Optical Tracking Odometry Sensor (OTOS).
43+
- [Self Test](examples/Example8_SelfTest/Example8_SelfTest.ino) - This example demonstrates how to perform a self test of the SparkFun Qwiic Optical Tracking Odometry Sensor (OTOS).
44+
45+
## Documentation
46+
47+
The full API and use documentation for this library is provided [here](https://docs.sparkfun.com/SparkFun_Qwiic_OTOS_Arduino_Library/). For a quick reference, the main methods available in the library are listed [here](https://docs.sparkfun.com/SparkFun_Qwiic_OTOS_Arduino_Library/class_qwiic_o_t_o_s.html).
48+
49+
Curious about the hardware this board works with - visit the SparkFun Optical Tracking Odometry Sensor [hardware repository](https://github.com/sparkfun/SparkFun_Optical_Tracking_Odometry_Sensor).
50+
51+
The ***Hookup Guide*** for the SparkFun Optical Tracking Odometry Sensor is available [here](https://docs.sparkfun.com/SparkFun_Optical_Tracking_Odometry_Sensor).
52+
53+
## License Information
54+
55+
This product is ***open source***!
56+
57+
This product is licensed using the [MIT Open Source License](https://opensource.org/license/mit).
2858

29-
Please review the LICENSE.md file for license information.
3059

31-
If you have any questions or concerns on licensing, please contact technical support on our [SparkFun forums](https://forum.sparkfun.com/viewforum.php?f=152).
3260

33-
Distributed as-is; no warranty is given.
3461

35-
- Your friends at SparkFun.
3662

37-
_<COLLABORATION CREDIT>_
373 KB
Loading

examples/Example8_SelfTest/Example8_SelfTest.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
SPDX-License-Identifier: MIT
3-
3+
44
Copyright (c) 2024 SparkFun Electronics
55
*/
66

@@ -41,10 +41,10 @@ void setup()
4141
Serial.println("The OTOS must be stationary during the self test!");
4242

4343
// Perform the self test
44-
sfeTkError_t result = myOtos.selfTest();
45-
44+
sfTkError_t result = myOtos.selfTest();
45+
4646
// Check if the self test passed
47-
if(result == kSTkErrOk)
47+
if (result == ksfTkErrOk)
4848
{
4949
Serial.println("Self test passed!");
5050
}

library.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name=SparkFun Qwiic OTOS Arduino Library
2-
version=1.0.2
2+
version=1.1.0
33
author=SparkFun Electronics <[email protected]>
44
maintainer=SparkFun Electronics <sparkfun.com>
55
sentence=A library to use the SparkFun Qwiic Optical Tracking Odometry Sensor
6-
paragraph=
6+
paragraph=The SparkFun Qwiic Optical Tracking Odometry Sensor empowers you to elevate a robots navigation capabilities with precision and streamlined integration.
77
category=Sensors
88
url=https://github.com/sparkfun/SparkFun_Qwiic_OTOS_Arduino_Library
99
architectures=*
10-
depends=SparkFun Toolkit (<1.0.0)
10+
depends=SparkFun Toolkit (>=1.0.0)
Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,27 @@
1-
/*
2-
SPDX-License-Identifier: MIT
3-
4-
Copyright (c) 2024 SparkFun Electronics
5-
*/
1+
/**
2+
* @file SparkFun_Qwiic_OTOS_Arduino_Library.h
3+
* @brief Arduino wrapper for the SparkFun Qwiic OTOS sensor driver
4+
* @details This file provides an Arduino-compatible interface to the SparkFun Qwiic
5+
* Optical Tracking Odometry Sensor (OTOS). It wraps the platform-agnostic
6+
* C++ driver to provide familiar Arduino conventions and simplified usage.
7+
*
8+
* Features:
9+
* - Simple Arduino-style begin() function
10+
* - Default Wire interface support
11+
* - Compatible with all Arduino platforms
12+
* - Inherits all functionality from base C++ driver
13+
* - Automatic I2C bus configuration
14+
*
15+
* @author SparkFun Electronics
16+
* @date February 2024
17+
* @copyright Copyright (c) 2024-2025, SparkFun Electronics Inc.
18+
*
19+
* SPDX-License-Identifier: MIT
20+
*
21+
* @see https://github.com/sparkfun/SparkFun_Qwiic_OTOS_Arduino_Library
22+
*/
23+
24+
// ...existing code...
625

726
/*******************************************************************************
827
SparkFun_Qwiic_OTOS_Arduino_Library.h - Arduino wrapper of the C++ driver
@@ -13,14 +32,16 @@
1332
*******************************************************************************/
1433

1534
#pragma once
16-
35+
// clang-format off
1736
#include "Arduino.h"
18-
#include "sfeQwiicOtos.h"
37+
#include <SparkFun_Toolkit.h>
38+
#include "sfTk/sfDevOTOS.h"
1939
#include <Wire.h>
40+
// clang-format on
2041

2142
/// @brief Arduino class for the SparkFun Qwiic Optical Tracking Odometry Sensor
2243
/// (OTOS)
23-
class QwiicOTOS : public sfeQwiicOtos
44+
class QwiicOTOS : public sfDevOTOS
2445
{
2546
public:
2647
/// @brief Begins the Qwiic OTOS and verifies it is connected
@@ -32,7 +53,7 @@ class QwiicOTOS : public sfeQwiicOtos
3253
_theI2CBus.init(wirePort, kDefaultAddress);
3354

3455
// Begin the sensor
35-
return sfeQwiicOtos::begin(&_theI2CBus) == kSTkErrOk;
56+
return sfDevOTOS::begin(&_theI2CBus) == ksfTkErrOk;
3657
}
3758

3859
protected:
@@ -42,5 +63,5 @@ class QwiicOTOS : public sfeQwiicOtos
4263
}
4364

4465
private:
45-
sfeTkArdI2C _theI2CBus;
66+
sfTkArdI2C _theI2CBus;
4667
};

0 commit comments

Comments
 (0)