Skip to content

Instantly share code, notes, and snippets.

@jimmo
Created August 31, 2017 05:07
Show Gist options
  • Save jimmo/e8329efcec07c3bc8ad457e8f7f06977 to your computer and use it in GitHub Desktop.
Save jimmo/e8329efcec07c3bc8ad457e8f7f06977 to your computer and use it in GitHub Desktop.
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