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...
6
25
7
26
/* ******************************************************************************
8
27
SparkFun_Qwiic_OTOS_Arduino_Library.h - Arduino wrapper of the C++ driver
13
32
*******************************************************************************/
14
33
15
34
#pragma once
16
-
35
+ // clang-format off
17
36
#include " Arduino.h"
18
- #include " sfeQwiicOtos.h"
37
+ #include < SparkFun_Toolkit.h>
38
+ #include " sfTk/sfDevOTOS.h"
19
39
#include < Wire.h>
40
+ // clang-format on
20
41
21
42
// / @brief Arduino class for the SparkFun Qwiic Optical Tracking Odometry Sensor
22
43
// / (OTOS)
23
- class QwiicOTOS : public sfeQwiicOtos
44
+ class QwiicOTOS : public sfDevOTOS
24
45
{
25
46
public:
26
47
// / @brief Begins the Qwiic OTOS and verifies it is connected
@@ -32,7 +53,7 @@ class QwiicOTOS : public sfeQwiicOtos
32
53
_theI2CBus.init (wirePort, kDefaultAddress );
33
54
34
55
// Begin the sensor
35
- return sfeQwiicOtos ::begin (&_theI2CBus) == kSTkErrOk ;
56
+ return sfDevOTOS ::begin (&_theI2CBus) == ksfTkErrOk ;
36
57
}
37
58
38
59
protected:
@@ -42,5 +63,5 @@ class QwiicOTOS : public sfeQwiicOtos
42
63
}
43
64
44
65
private:
45
- sfeTkArdI2C _theI2CBus;
66
+ sfTkArdI2C _theI2CBus;
46
67
};
0 commit comments