https://github.com/mcauser/microbit-tm1637
https://github.com/mcauser/micropython-tm1637
Code: Select all
from microbit import *
from tm1637 import TM1637
tm = TM1637(clk=pin1, dio=pin2)
tm.scroll('cool story bro')
Code: Select all
from microbit import *
from tm1637 import TM1637
tm = TM1637(clk=pin1, dio=pin2)
tm.scroll('cool story bro')
Code: Select all
# Copy the contents of tm1637.py exactly
from microbit import sleep
_SEG = bytearray(b'\x3F\x06\x5B\x4F\x66\x6D\x7D\x07\x7F\x6F\x77\x7C\x39\x5E\x79\x71\x3D\x76\x06\x1E\x76\x38\x55\x54\x3F\x73\x67\x50\x6D\x78\x3E\x1C\x2A\x76\x6E\x5B\x00\x40\x63')
class TM1637(object):
# ... etc
# Then write your actual micro:bit program here:
display = TM1637(pin0, pin1)
while True:
if button_a.was_pressed():
# ... etc
Sorry I should have added an extra point -- the built-in filesystem in the micro:bit has nothing to do with the virtual USB drive you see in Windows Explorer. The foloder you see in Windows Explorer only supports one thing: dragging a .hex file onto it to completely reprogram the micro:bit. (And this is what Mu is doing behind the scenes when you press the "Flash" button)