Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ikostan authored Jun 26, 2024
1 parent d401fc9 commit 428e888
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lessons/lesson_1/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@
IS_ON = 0


def toggle_led(IS_ON) -> int:
def toggle_led(IS_ON) -> None:
"""
Toggle LED
"""
IS_ON = 1 if IS_ON == 0 else 0
LED.value(IS_ON)
return IS_ON

if __name__ == '__main__':
while True:
toggle_led()
time.sleep(0.3)
toggle_led(IS_ON)
time.sleep(0.3
IS_ON = 1 if IS_ON == 0 else 1

0 comments on commit 428e888

Please sign in to comment.