Skip to content

Commit

Permalink
Merge pull request #245 from BBfiChe/master
Browse files Browse the repository at this point in the history
Update Flashlight.py
  • Loading branch information
TinyCircuits authored Jul 2, 2024
2 parents eb23b85 + aad89bb commit 5d58854
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 11 deletions.
36 changes: 25 additions & 11 deletions Flashlight/Flashlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,36 @@

clicks = 1
fill = 1
ctr = 2

thumby.display.fill(1)
thumby.display.brightness(127)

def checks():
global ctr
if ctr == 0:
thumby.display.brightness(27)
if ctr == 1:
thumby.display.brightness(72)
if ctr == 2:
thumby.display.brightness(127)
if ctr > 2:
ctr = 0
if ctr < 0:
ctr = 2

while True:
checks()
thumby.display.fill(fill)
thumby.display.blit(version, 0, 31, 8, 8, -1, 0, 0)
#thumby.display.blit(version, 0, 31, 8, 8, -1, 0, 0)

if thumby.buttonA.justPressed():
if fill == 1:
fill = 0
version = bytearray([0,16,48,240,240,240,48,16,
0,0,0,3,3,3,0,0])
else:
fill = 1
version = bytearray([255, 233, 207, 9, 15, 9, 207, 233,
3, 3, 3, 0, 0, 0, 3, 3])
if thumby.buttonU.justPressed():
ctr += 1
if thumby.buttonD.justPressed():
ctr -= 1


if thumby.buttonB.justPressed():
if thumby.buttonB.justPressed() or thumby.buttonA.justPressed():
if clicks == 1:
thumby.display.fill(0)
thumby.display.drawText("Exiting...", 5, 10, 1)
Expand Down
6 changes: 6 additions & 0 deletions Flashlight/arcade_description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Created by @BBfiChe on Discord
-------------------
Updates:
-------------------
Update 1.0.2
- Added a brightness level changer
- Thumby starts the game at screen's max brightness
- Removed the ablility to turn off the flashlight as it was not very useful
- Removed flashlight symbol

Update 1.0.1
- Updated dark screen flashlight to appear off instead of on.

Expand Down

0 comments on commit 5d58854

Please sign in to comment.