Created
February 9, 2021 18:14
-
-
Save nasajpledu/28dc1178c3d376ed79244627f1e5d871 to your computer and use it in GitHub Desktop.
Code a Mars Landing - Step 4: Transition between stages
This file contains hidden or 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
from components import Buzzer | |
buzzer = Buzzer("D5") | |
if distance < 10: | |
red_led.on() | |
yellow_led.on() | |
green_led.on() | |
buzzer.on() | |
elif distance < 20: | |
red_led.off() | |
yellow_led.on() | |
green_led.on() | |
else: | |
red_led.off() | |
yellow_led.off() | |
green_led.on() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment