-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #242 from BBfiChe/master
Add Flashlight Game and update Microsquareroot calculator
- Loading branch information
Showing
5 changed files
with
128 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import thumby | ||
import time | ||
|
||
# A-Flashlight.py | ||
|
||
black = bytearray([255, 233, 207, 9, 15, 9, 207, 233, | ||
3, 3, 3, 0, 0, 0, 3, 3]) | ||
|
||
white = bytearray([0, 22, 48, 246, 240, 246, 48, 22, | ||
0, 0, 0, 3, 3, 3, 0, 0]) | ||
|
||
# BITMAP: width: 8, height: 10 | ||
off_flashlight = bytearray([0,16,48,240,240,240,48,16, | ||
0,0,0,3,3,3,0,0]) | ||
|
||
version = bytearray([255, 233, 207, 9, 15, 9, 207, 233, | ||
3, 3, 3, 0, 0, 0, 3, 3]) | ||
|
||
|
||
# BITMAP: width: 8, height: 8 | ||
copyright = bytearray([255,129,189,165,165,165,129,255]) | ||
|
||
clicks = 1 | ||
fill = 1 | ||
|
||
while True: | ||
thumby.display.fill(fill) | ||
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.buttonB.justPressed(): | ||
if clicks == 1: | ||
thumby.display.fill(0) | ||
thumby.display.drawText("Exiting...", 5, 10, 1) | ||
thumby.display.drawText(" BBfiChe", 3, 25, 1) | ||
thumby.display.blit(copyright, 4, 25, 8, 8, -1, 0, 0) | ||
thumby.display.update() | ||
time.sleep(3) | ||
thumby.reset() | ||
else: | ||
clicks += 1 | ||
|
||
thumby.display.update() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
A simple flashlight script so that you have a mini flashlight to help you find things under your couch or something, I'm not sure I just made this for fun lol | ||
------------------- | ||
Created by @BBfiChe on Discord | ||
------------------- | ||
Updates: | ||
------------------- | ||
Update 1.0.1 | ||
- Updated dark screen flashlight to appear off instead of on. | ||
|
||
Update 1.0.0 | ||
- Added Flashlight game. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters