44
44
* [ set\_ all\_ color] ( #modulino.pixels.ModulinoPixels.set_all_color )
45
45
* [ set\_ color] ( #modulino.pixels.ModulinoPixels.set_color )
46
46
* [ set\_ rgb] ( #modulino.pixels.ModulinoPixels.set_rgb )
47
+ * [ set\_ brightness] ( #modulino.pixels.ModulinoPixels.set_brightness )
48
+ * [ set\_ all\_ brightness] ( #modulino.pixels.ModulinoPixels.set_all_brightness )
47
49
* [ clear] ( #modulino.pixels.ModulinoPixels.clear )
48
50
* [ clear\_ range] ( #modulino.pixels.ModulinoPixels.clear_range )
49
51
* [ clear\_ all] ( #modulino.pixels.ModulinoPixels.clear_all )
@@ -529,6 +531,7 @@ def __int__() -> int
529
531
```
530
532
531
533
Return the 32 - bit integer representation of the color.
534
+ Used bits: 8 to 15 for blue, 16 to 23 for green, 24 to 31 for red.
532
535
533
536
< a id =" modulino.pixels.ModulinoPixels" >< / a>
534
537
@@ -582,7 +585,7 @@ Sets the color of the LEDs in the given range to the given RGB values.
582
585
583
586
** Returns** :
584
587
585
- - `ModulinoPixels` - The object itself. Allows for daily chaining of methods.
588
+ - `ModulinoPixels` - The object itself. Allows for daisy chaining of methods.
586
589
587
590
< a id =" modulino.pixels.ModulinoPixels.set_range_color" >< / a>
588
591
@@ -607,7 +610,7 @@ Sets the color of the LEDs in the given range to the given color.
607
610
608
611
** Returns** :
609
612
610
- - `ModulinoPixels` - The object itself. Allows for daily chaining of methods.
613
+ - `ModulinoPixels` - The object itself. Allows for daisy chaining of methods.
611
614
612
615
< a id =" modulino.pixels.ModulinoPixels.set_all_rgb" >< / a>
613
616
@@ -632,7 +635,7 @@ Sets the color of all the LEDs to the given RGB values.
632
635
633
636
** Returns** :
634
637
635
- - `ModulinoPixels` - The object itself. Allows for daily chaining of methods.
638
+ - `ModulinoPixels` - The object itself. Allows for daisy chaining of methods.
636
639
637
640
< a id =" modulino.pixels.ModulinoPixels.set_all_color" >< / a>
638
641
@@ -653,7 +656,7 @@ Sets the color of all the LEDs to the given color.
653
656
654
657
** Returns** :
655
658
656
- - `ModulinoPixels` - The object itself. Allows for daily chaining of methods.
659
+ - `ModulinoPixels` - The object itself. Allows for daisy chaining of methods.
657
660
658
661
< a id =" modulino.pixels.ModulinoPixels.set_color" >< / a>
659
662
@@ -676,7 +679,7 @@ Sets the color of the given LED index to the given color.
676
679
677
680
** Returns** :
678
681
679
- - `ModulinoPixels` - The object itself. Allows for daily chaining of methods.
682
+ - `ModulinoPixels` - The object itself. Allows for daisy chaining of methods.
680
683
681
684
< a id =" modulino.pixels.ModulinoPixels.set_rgb" >< / a>
682
685
@@ -703,7 +706,46 @@ Set the color of the given LED index to the given RGB values.
703
706
704
707
** Returns** :
705
708
706
- - `ModulinoPixels` - The object itself. Allows for daily chaining of methods.
709
+ - `ModulinoPixels` - The object itself. Allows for daisy chaining of methods.
710
+
711
+ < a id =" modulino.pixels.ModulinoPixels.set_brightness" >< / a>
712
+
713
+ # ## `set_brightness`
714
+
715
+ ```python
716
+ def set_brightness(idx: int , brightness: int ) -> ' ModulinoPixels'
717
+ ```
718
+
719
+ Sets the brightness of the given LED index.
720
+
721
+ ** Arguments** :
722
+
723
+ - `idx` _int_ - The index of the LED (0 ..7 ).
724
+ - `brightness` _int_ - The brightness of the LED . It should be a value between 0 and 100 .
725
+
726
+
727
+ ** Returns** :
728
+
729
+ - `ModulinoPixels` - The object itself. Allows for daisy chaining of methods.
730
+
731
+ < a id =" modulino.pixels.ModulinoPixels.set_all_brightness" >< / a>
732
+
733
+ # ## `set_all_brightness`
734
+
735
+ ```python
736
+ def set_all_brightness(brightness: int ) -> ' ModulinoPixels'
737
+ ```
738
+
739
+ Sets the brightness of all the LEDs.
740
+
741
+ ** Arguments** :
742
+
743
+ - `brightness` _int_ - The brightness of the LED . It should be a value between 0 and 100 .
744
+
745
+
746
+ ** Returns** :
747
+
748
+ - `ModulinoPixels` - The object itself. Allows for daisy chaining of methods.
707
749
708
750
< a id =" modulino.pixels.ModulinoPixels.clear" >< / a>
709
751
@@ -722,7 +764,7 @@ Turns off the LED at the given index.
722
764
723
765
** Returns** :
724
766
725
- - `ModulinoPixels` - The object itself. Allows for daily chaining of methods.
767
+ - `ModulinoPixels` - The object itself. Allows for daisy chaining of methods.
726
768
727
769
< a id =" modulino.pixels.ModulinoPixels.clear_range" >< / a>
728
770
@@ -742,7 +784,7 @@ Turns off the LEDs in the given range.
742
784
743
785
** Returns** :
744
786
745
- - `ModulinoPixels` - The object itself. Allows for daily chaining of methods.
787
+ - `ModulinoPixels` - The object itself. Allows for daisy chaining of methods.
746
788
747
789
< a id =" modulino.pixels.ModulinoPixels.clear_all" >< / a>
748
790
@@ -756,7 +798,7 @@ Turns all the LEDs off.
756
798
757
799
** Returns** :
758
800
759
- - `ModulinoPixels` - The object itself. Allows for daily chaining of methods.
801
+ - `ModulinoPixels` - The object itself. Allows for daisy chaining of methods.
760
802
761
803
< a id =" modulino.pixels.ModulinoPixels.show" >< / a>
762
804
0 commit comments