@@ -0,0 +1,2044 @@
+from microbit import *%0A%0Asec = 1%0Aseconds = %5B%5D%0Amins = 0%0Aminutes = %5B%5D%0Ahrs = 0%0Ahours = %5B%5D%0Ab = 8 #brightness%0A%0Adef one(x):%0A    zero(x)%0A    display.set_pixel(x, 3, b),%0A        %0Adef two(x):%0A    zero(x)%0A    display.set_pixel(x, 2, b),%0A%0Adef three(x):%0A    zero(x)%0A    display.set_pixel(x, 3, b)%0A    display.set_pixel(x, 2, b),%0A    %0Adef four(x):%0A    zero(x)%0A    display.set_pixel(x, 1, b),%0A%0Adef five(x):%0A    zero(x)%0A    display.set_pixel(x, 3, b)%0A    display.set_pixel(x, 1, b),%0A%0Adef six(x):%0A    zero(x)%0A    display.set_pixel(x, 2, b)%0A    display.set_pixel(x, 1, b),%0A%0Adef seven(x):%0A    zero(x)%0A    display.set_pixel(x, 1, b)%0A    display.set_pixel(x, 2, b)%0A    display.set_pixel(x, 3, b),%0A%0Adef eight(x):%0A    zero(x)%0A    display.set_pixel(x, 0, b),%0A%0Adef nine(x):%0A    zero(x)%0A    display.set_pixel(x, 0, b)%0A    display.set_pixel(x, 3, b),%0A    %0Adef zero(x):%0A    for i in range(0,4):%0A        display.set_pixel(x, i, 0)%0A%0Adef fadesecs(x):%0A    display.set_pixel(2, 2, x)%0A    display.set_pixel(2, 1, x)%0A%0A    %0A%0Abinaries = %5Bone, two, three, four, five, six, seven, eight, nine, zero%5D%0A%0A%0A%0Awhile True:%0A    sleep(500)%0A    fadesecs(3)%0A    sleep(500)%0A    fadesecs(6)%0A    sec += 1%0A    if sec %25 60 == 0:%0A        mins += 1%0A        sec = 0%0A        if mins %25 60 == 0:%0A            hrs += 1%0A            mins = 0%0A            if hrs %25 24 == 0:%0A                hrs = 0%0A%0A    if mins%3C10:%0A        binaries%5Bmins%5D(4)%0A    elif mins %3E 9:%0A        minutes = %5Bint(i) for i in str(mins)%5D%0A        binaries%5Bminutes%5B0%5D-1%5D(3)%0A        binaries%5Bminutes%5B1%5D-1%5D(4)%0A    if hrs%3C10:%0A        binaries%5Bhrs-1%5D(1)%0A    elif hrs %3E 9:%0A        hours = %5Bint(i) for i in str(hrs)%5D%0A        binaries%5Bhours%5B0%5D-1%5D(0)%0A        binaries%5Bhours%5B1%5D-1%5D(1)%0A%0A    if button_a.is_pressed() and button_b.is_pressed():%0A        if sec %3C 60:%0A            sec = 1%0A        sleep(100)%0A    if button_a.was_pressed():%0A        if hrs %3C 60:%0A            hrs += 1%0A        else:%0A            hrs = 0%0A        sleep(100)%0A    if button_b.is_pressed():%0A        if mins %3C 24:%0A            mins += 1%0A        else:%0A            mins = 0%0A        sleep(100)%0A

Create BitWatch.py