Shortened fun sounds
This commit is contained in:
@@ -249,11 +249,7 @@ async def play_power_up():
|
|||||||
async def play_rickroll_inspired():
|
async def play_rickroll_inspired():
|
||||||
"""Fun 80s-style dance beat inspired sound"""
|
"""Fun 80s-style dance beat inspired sound"""
|
||||||
# Upbeat bouncy rhythm
|
# Upbeat bouncy rhythm
|
||||||
pattern = [
|
pattern = [ (cn["B3"], 100), (cn["Cs4"], 100), (cn["Ds4"], 100), (cn["E4"], 100), (cn["Cs4"], 100), (cn["B3"], 100), (cn["A3"], 100), (cn["B3"], 200), (cn["Cs4"], 100), (cn["B3"], 100), (cn["A3"], 100), (cn["Gs3"], 200), ]
|
||||||
(cn["Gs3"], 200), (cn["A3"], 200), (cn["B3"], 200), (cn["Cs4"], 200),
|
|
||||||
(cn["A3"], 200), (cn["Gs3"], 200), (cn["Fs3"], 200), (cn["Gs3"], 400),
|
|
||||||
(cn["A3"], 200), (cn["Gs3"], 200), (cn["Fs3"], 200), (cn["E3"], 400),
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -262,7 +258,7 @@ async def play_rickroll_inspired():
|
|||||||
#await wait(50)
|
#await wait(50)
|
||||||
|
|
||||||
# Basically a big if else statement that calls the functions above
|
# Basically a big if else statement that calls the functions above
|
||||||
async def celebrate_mission_complete(sound_type=CelebrationSound.WAITING_SOUND):
|
async def celebrate_mission_complete(sound_type=CelebrationSound.RICKROLL_INSPIRED):
|
||||||
"""
|
"""
|
||||||
Main celebration function to call after completing a mission.
|
Main celebration function to call after completing a mission.
|
||||||
Plays a sound and shows light animation.
|
Plays a sound and shows light animation.
|
||||||
@@ -302,7 +298,7 @@ async def celebrate_mission_complete(sound_type=CelebrationSound.WAITING_SOUND):
|
|||||||
async def main():
|
async def main():
|
||||||
# MAIN LOOP
|
# MAIN LOOP
|
||||||
while True:
|
while True:
|
||||||
await celebrate_mission_complete(CelebrationSound.WAITING_SOUND)
|
await celebrate_mission_complete(CelebrationSound.RICKROLL_INSPIRED)
|
||||||
color_reflected_percent = await color_sensor.reflection()
|
color_reflected_percent = await color_sensor.reflection()
|
||||||
print(f"Color reflection percentage: {color_reflected_percent}")
|
print(f"Color reflection percentage: {color_reflected_percent}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user