7
7
* [ tone] ( #modulino.buzzer.ModulinoBuzzer.tone )
8
8
* [ no\_ tone] ( #modulino.buzzer.ModulinoBuzzer.no_tone )
9
9
* [ buttons] ( #modulino.buttons )
10
+ * [ ModulinoButtonsLED] ( #modulino.buttons.ModulinoButtonsLED )
11
+ * [ on] ( #modulino.buttons.ModulinoButtonsLED.on )
12
+ * [ off] ( #modulino.buttons.ModulinoButtonsLED.off )
13
+ * [ value] ( #modulino.buttons.ModulinoButtonsLED.value )
14
+ * [ value] ( #modulino.buttons.ModulinoButtonsLED.value )
10
15
* [ ModulinoButtons] ( #modulino.buttons.ModulinoButtons )
11
16
* [ \_\_ init\_\_ ] ( #modulino.buttons.ModulinoButtons.__init__ )
17
+ * [ led\_ a] ( #modulino.buttons.ModulinoButtons.led_a )
18
+ * [ led\_ b] ( #modulino.buttons.ModulinoButtons.led_b )
19
+ * [ led\_ c] ( #modulino.buttons.ModulinoButtons.led_c )
12
20
* [ set\_ led\_ status] ( #modulino.buttons.ModulinoButtons.set_led_status )
13
21
* [ long\_ press\_ duration] ( #modulino.buttons.ModulinoButtons.long_press_duration )
14
22
* [ long\_ press\_ duration] ( #modulino.buttons.ModulinoButtons.long_press_duration )
35
43
* [ button\_ a\_ pressed] ( #modulino.buttons.ModulinoButtons.button_a_pressed )
36
44
* [ button\_ b\_ pressed] ( #modulino.buttons.ModulinoButtons.button_b_pressed )
37
45
* [ button\_ c\_ pressed] ( #modulino.buttons.ModulinoButtons.button_c_pressed )
38
- * [ pressure] ( #modulino.pressure )
39
- * [ ModulinoPressure] ( #modulino.pressure.ModulinoPressure )
40
- * [ \_\_ init\_\_ ] ( #modulino.pressure.ModulinoPressure.__init__ )
41
- * [ pressure] ( #modulino.pressure.ModulinoPressure.pressure )
42
- * [ temperature] ( #modulino.pressure.ModulinoPressure.temperature )
43
- * [ altitude] ( #modulino.pressure.ModulinoPressure.altitude )
44
46
* [ modulino] ( #modulino.modulino )
45
47
* [ Modulino] ( #modulino.modulino.Modulino )
46
48
* [ default\_ addresses] ( #modulino.modulino.Modulino.default_addresses )
@@ -126,10 +128,7 @@ Predefined notes are available in the NOTES dictionary e.g. ModulinoBuzzer.NOTES
126
128
127
129
Dictionary with the notes and their corresponding frequencies .
128
130
The supported notes are defined as follows :
129
- - B0
130
- - C1, CS1 , D1, DS1 , E1, F1, FS1 , G1, GS1 , A1, AS1 , B1
131
- - C2, CS2 , D2, DS2 , E2, F2, FS2 , G2, GS2 , A2, AS2 , B2
132
- - C3, CS3 , D3, DS3 , E3, F3, FS3 , G3, GS3 , A3, AS3 , B3
131
+ - FS3 , G3, GS3 , A3, AS3 , B3
133
132
- C4, CS4 , D4, DS4 , E4, F4, FS4 , G4, GS4 , A4, AS4 , B4
134
133
- C5, CS5 , D5, DS5 , E5, F5, FS5 , G5, GS5 , A5, AS5 , B5
135
134
- C6, CS6 , D6, DS6 , E6, F6, FS6 , G6, GS6 , A6, AS6 , B6
@@ -167,7 +166,7 @@ If blocking is set to True, the function will wait until the tone is finished.
167
166
168
167
** Arguments** :
169
168
170
- - `frequency` - The frequency of the tone in Hz
169
+ - `frequency` - The frequency of the tone in Hz (freuqencies below 180 Hz are not supported)
171
170
- `lenght_ms` - The duration of the tone in milliseconds. If omitted, the tone will play indefinitely
172
171
- `blocking` - If set to True , the function will wait until the tone is finished
173
172
@@ -181,6 +180,59 @@ def no_tone() -> None
181
180
182
181
Stops the current tone from playing.
183
182
183
+ < a id =" modulino.buttons.ModulinoButtonsLED" >< / a>
184
+
185
+ # # class `ModulinoButtonsLED`
186
+
187
+ ```python
188
+ class ModulinoButtonsLED()
189
+ ```
190
+
191
+ Class to interact with the LEDs of the Modulino Buttons.
192
+
193
+ < a id =" modulino.buttons.ModulinoButtonsLED.on" >< / a>
194
+
195
+ # ## `on`
196
+
197
+ ```python
198
+ def on()
199
+ ```
200
+
201
+ Turns the LED on.
202
+
203
+ < a id =" modulino.buttons.ModulinoButtonsLED.off" >< / a>
204
+
205
+ # ## `off`
206
+
207
+ ```python
208
+ def off()
209
+ ```
210
+
211
+ Turns the LED off.
212
+
213
+ < a id =" modulino.buttons.ModulinoButtonsLED.value" >< / a>
214
+
215
+ # ## `value`
216
+
217
+ ```python
218
+ @ property
219
+ def value()
220
+ ```
221
+
222
+ Returns the value of the LED (1 for on, 0 for off).
223
+
224
+ < a id =" modulino.buttons.ModulinoButtonsLED.value" >< / a>
225
+
226
+ # ## `value`
227
+
228
+ ```python
229
+ @ value.setter
230
+ def value(value)
231
+ ```
232
+
233
+ Sets the value of the LED (1 for on, 0 for off).
234
+ Calling this method will update the physical status of the LED immediately.
235
+
184
236
< a id =" modulino.buttons.ModulinoButtons" >< / a>
185
237
186
238
# # class `ModulinoButtons`
@@ -206,6 +258,39 @@ Initializes the Modulino Buttons.
206
258
- `i2c_bus` _I2C_ - The I2C bus to use. If not provided, the default I2C bus will be used.
207
259
- `address` _int_ - The I2C address of the module. If not provided, the default address will be used.
208
260
261
+ < a id = " modulino.buttons.ModulinoButtons.led_a" >< / a>
262
+
263
+ # ## `led_a`
264
+
265
+ ```python
266
+ @ property
267
+ def led_a () -> ModulinoButtonsLED
268
+ ```
269
+
270
+ Returns the LED A object of the module.
271
+
272
+ < a id =" modulino.buttons.ModulinoButtons.led_b" >< / a>
273
+
274
+ # ## `led_b`
275
+
276
+ ```python
277
+ @ property
278
+ def led_b() -> ModulinoButtonsLED
279
+ ```
280
+
281
+ Returns the LED B object of the module.
282
+
283
+ < a id =" modulino.buttons.ModulinoButtons.led_c" >< / a>
284
+
285
+ # ## `led_c`
286
+
287
+ ```python
288
+ @ property
289
+ def led_c() -> ModulinoButtonsLED
290
+ ```
291
+
292
+ Returns the LED C object of the module.
293
+
209
294
< a id =" modulino.buttons.ModulinoButtons.set_led_status" >< / a>
210
295
211
296
# ## `set_led_status`
@@ -506,70 +591,6 @@ def button_c_pressed() -> bool
506
591
507
592
Returns True if button C is currently pressed.
508
593
509
- < a id =" modulino.pressure.ModulinoPressure" >< / a>
510
-
511
- # # class `ModulinoPressure`
512
-
513
- ```python
514
- class ModulinoPressure(Modulino)
515
- ```
516
-
517
- Class to interact with the pressure sensor of the Modulino Pressure.
518
-
519
- < a id =" modulino.pressure.ModulinoPressure.__init__" >< / a>
520
-
521
- # ## `__init__`
522
-
523
- ```python
524
- def __init__ (i2c_bus: I2C = None , address: int = None ) -> None
525
- ```
526
-
527
- Initializes the Modulino Pressure.
528
-
529
- ** Arguments** :
530
-
531
- - `i2c_bus` _I2C_ - The I2C bus to use. If not provided, the default I2C bus will be used.
532
- - `address` _int_ - The I2C address of the module. If not provided, the default address will be used.
533
-
534
- < a id =" modulino.pressure.ModulinoPressure.pressure" >< / a>
535
-
536
- # ## `pressure`
537
-
538
- ```python
539
- @ property
540
- def pressure() -> float
541
- ```
542
-
543
- ** Returns** :
544
-
545
- - `float ` - The pressure in hectopascals.
546
-
547
- < a id =" modulino.pressure.ModulinoPressure.temperature" >< / a>
548
-
549
- # ## `temperature`
550
-
551
- ```python
552
- @ property
553
- def temperature() -> float
554
- ```
555
-
556
- ** Returns** :
557
-
558
- - `float ` - The temperature in degrees Celsius.
559
-
560
- < a id =" modulino.pressure.ModulinoPressure.altitude" >< / a>
561
-
562
- # ## `altitude`
563
-
564
- ```python
565
- @ property
566
- def altitude() -> float
567
- ```
568
-
569
- ** Returns** :
570
-
571
- - `float ` - The altitude in meters.
572
-
573
594
< a id =" modulino.modulino.Modulino" >< / a>
574
595
575
596
# # class `Modulino`
0 commit comments