Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fbfa7e0

Browse files
sebromeroactions-user
authored andcommittedNov 6, 2024
Update documentation
1 parent f08fbe1 commit fbfa7e0

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed
 

‎docs/api.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
* [clear\_all](#modulino.pixels.ModulinoPixels.clear_all)
9797
* [show](#modulino.pixels.ModulinoPixels.show)
9898
* [movement](#modulino.movement)
99+
* [MovementValues](#modulino.movement.MovementValues)
99100
* [ModulinoMovement](#modulino.movement.ModulinoMovement)
100101
* [\_\_init\_\_](#modulino.movement.ModulinoMovement.__init__)
101102
* [accelerometer](#modulino.movement.ModulinoMovement.accelerometer)
@@ -1188,7 +1189,7 @@ Sets the color of the given LED index to the given color.
11881189

11891190
**Arguments**:
11901191

1191-
- `idx` _int_ - The index of the LED.
1192+
- `idx` _int_ - The index of the LED (0..7).
11921193
- `rgb` _ModulinoColor_ - The color of the LED.
11931194
- `brightness` _int_ - The brightness of the LED. It should be a value between 0 and 100.
11941195

@@ -1204,7 +1205,7 @@ Set the color of the given LED index to the given RGB values.
12041205

12051206
**Arguments**:
12061207

1207-
- `idx` _int_ - The index of the LED.
1208+
- `idx` _int_ - The index of the LED (0..7).
12081209
- `r` _int_ - The red value of the color.
12091210
- `g` _int_ - The green value of the color.
12101211
- `b` _int_ - The blue value of the color.
@@ -1222,7 +1223,7 @@ Turns off the LED at the given index.
12221223

12231224
**Arguments**:
12241225

1225-
- `idx` _int_ - The index of the LED.
1226+
- `idx` _int_ - The index of the LED (0..7).
12261227

12271228
<a id="modulino.pixels.ModulinoPixels.clear_range"></a>
12281229

@@ -1249,10 +1250,6 @@ def clear_all() -> None
12491250

12501251
Turns all the LEDs off.
12511252

1252-
**Arguments**:
1253-
1254-
- `idx` _int_ - The index of the LED
1255-
12561253
<a id="modulino.pixels.ModulinoPixels.show"></a>
12571254

12581255
### `show`
@@ -1264,6 +1261,12 @@ def show() -> None
12641261
Applies the changes to the LEDs. This function needs to be called after any changes to the LEDs.
12651262
Otherwise, the changes will not be visible.
12661263

1264+
<a id="modulino.movement.MovementValues"></a>
1265+
1266+
### `MovementValues`
1267+
1268+
A named tuple to store the x, y, and z values of the movement sensors.
1269+
12671270
<a id="modulino.movement.ModulinoMovement"></a>
12681271

12691272
## class `ModulinoMovement`
@@ -1295,25 +1298,29 @@ Initializes the Modulino Movement.
12951298

12961299
```python
12971300
@property
1298-
def accelerometer() -> tuple[float, float, float]
1301+
def accelerometer() -> MovementValues
12991302
```
13001303

13011304
**Returns**:
13021305

1303-
tuple[float, float, float]: The acceleration values in the x, y, and z axes.
1306+
- `MovementValues` - The acceleration values in the x, y, and z axes.
1307+
These values can be accessed as .x, .y, and .z properties
1308+
or by using the index operator for tuple unpacking.
13041309

13051310
<a id="modulino.movement.ModulinoMovement.gyro"></a>
13061311

13071312
### `gyro`
13081313

13091314
```python
13101315
@property
1311-
def gyro() -> tuple[float, float, float]
1316+
def gyro() -> MovementValues
13121317
```
13131318

13141319
**Returns**:
13151320

1316-
tuple[float, float, float]: The angular velocity values in the x, y, and z axes.
1321+
- `MovementValues` - The gyroscope values in the x, y, and z axes.
1322+
These values can be accessed as .x, .y, and .z properties
1323+
or by using the index operator for tuple unpacking.
13171324

13181325
<a id="modulino.thermo.Measurement"></a>
13191326

0 commit comments

Comments
 (0)
Please sign in to comment.