96
96
* [ clear\_ all] ( #modulino.pixels.ModulinoPixels.clear_all )
97
97
* [ show] ( #modulino.pixels.ModulinoPixels.show )
98
98
* [ movement] ( #modulino.movement )
99
+ * [ MovementValues] ( #modulino.movement.MovementValues )
99
100
* [ ModulinoMovement] ( #modulino.movement.ModulinoMovement )
100
101
* [ \_\_ init\_\_ ] ( #modulino.movement.ModulinoMovement.__init__ )
101
102
* [ accelerometer] ( #modulino.movement.ModulinoMovement.accelerometer )
@@ -1188,7 +1189,7 @@ Sets the color of the given LED index to the given color.
1188
1189
1189
1190
** Arguments** :
1190
1191
1191
- - `idx` _int_ - The index of the LED .
1192
+ - `idx` _int_ - The index of the LED ( 0 . .7 ) .
1192
1193
- `rgb` _ModulinoColor_ - The color of the LED .
1193
1194
- `brightness` _int_ - The brightness of the LED . It should be a value between 0 and 100 .
1194
1195
@@ -1204,7 +1205,7 @@ Set the color of the given LED index to the given RGB values.
1204
1205
1205
1206
** Arguments** :
1206
1207
1207
- - `idx` _int_ - The index of the LED .
1208
+ - `idx` _int_ - The index of the LED ( 0 . .7 ) .
1208
1209
- `r` _int_ - The red value of the color.
1209
1210
- `g` _int_ - The green value of the color.
1210
1211
- `b` _int_ - The blue value of the color.
@@ -1222,7 +1223,7 @@ Turns off the LED at the given index.
1222
1223
1223
1224
** Arguments** :
1224
1225
1225
- - `idx` _int_ - The index of the LED .
1226
+ - `idx` _int_ - The index of the LED ( 0 . .7 ) .
1226
1227
1227
1228
< a id =" modulino.pixels.ModulinoPixels.clear_range" >< / a>
1228
1229
@@ -1249,10 +1250,6 @@ def clear_all() -> None
1249
1250
1250
1251
Turns all the LEDs off.
1251
1252
1252
- ** Arguments** :
1253
-
1254
- - `idx` _int_ - The index of the LED
1255
-
1256
1253
< a id =" modulino.pixels.ModulinoPixels.show" >< / a>
1257
1254
1258
1255
# ## `show`
@@ -1264,6 +1261,12 @@ def show() -> None
1264
1261
Applies the changes to the LEDs. This function needs to be called after any changes to the LEDs.
1265
1262
Otherwise, the changes will not be visible.
1266
1263
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
+
1267
1270
< a id =" modulino.movement.ModulinoMovement" >< / a>
1268
1271
1269
1272
# # class `ModulinoMovement`
@@ -1295,25 +1298,29 @@ Initializes the Modulino Movement.
1295
1298
1296
1299
```python
1297
1300
@ property
1298
- def accelerometer() -> tuple[ float , float , float ]
1301
+ def accelerometer() -> MovementValues
1299
1302
```
1300
1303
1301
1304
** Returns** :
1302
1305
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.
1304
1309
1305
1310
< a id =" modulino.movement.ModulinoMovement.gyro" >< / a>
1306
1311
1307
1312
# ## `gyro`
1308
1313
1309
1314
```python
1310
1315
@ property
1311
- def gyro() -> tuple[ float , float , float ]
1316
+ def gyro() -> MovementValues
1312
1317
```
1313
1318
1314
1319
** Returns** :
1315
1320
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.
1317
1324
1318
1325
< a id =" modulino.thermo.Measurement" >< / a>
1319
1326
0 commit comments