Skip to content

Instantly share code, notes, and snippets.

@jimmo
Created August 31, 2017 05:07
Show Gist options
  • Select an option

  • Save jimmo/8f0fd34de9fcd4586dc5006b9fe21c79 to your computer and use it in GitHub Desktop.

Select an option

Save jimmo/8f0fd34de9fcd4586dc5006b9fe21c79 to your computer and use it in GitHub Desktop.
from microbit import *
time_last_press = 0
while True:
if button_a.was_pressed():
time_now = running_time()
display.show(str(time_now - time_last_press))
time_last_press = time_now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment