Created
August 31, 2017 05:07
-
-
Save jimmo/e8329efcec07c3bc8ad457e8f7f06977 to your computer and use it in GitHub Desktop.
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
from microbit import * | |
while True: | |
if button_a.was_pressed(): | |
pin0.write_digital(1) | |
start = running_time() | |
while running_time() - start < 5000: | |
pass | |
pin0.write_digital(0) | |
if button_b.was_pressed(): | |
pin0.write_digital(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment