Skip to content

Commit

Permalink
adds set_brightness to pixel
Browse files Browse the repository at this point in the history
  • Loading branch information
speratus committed Nov 15, 2019
1 parent c6b4908 commit 21e1ccd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions blinkter/pixel.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ def increment_brightness(self, amount=0.0):
self.bi += a

self.draw()

def set_brightness(self, brightness):
if 0 <= brightness <= 1.0:
self.brightness = brightness

def red(self):
"""
Expand Down

0 comments on commit 21e1ccd

Please sign in to comment.