GuyCarver-MicroPython/main.py

50 wiersze
848 B
Python
Czysty Zwykły widok Historia

2014-11-03 23:02:34 +00:00
# main.py -- put your code here!
# import TreatThrower
# import Balance
# Balance.main()
2014-11-13 13:21:41 +00:00
# from seriffont import *
# from sysfont import *
2014-11-03 23:02:34 +00:00
from terminalfont import *
2014-11-13 13:21:41 +00:00
# from SonarDisplay import SonarDisplay
pyt = 0
if pyt :
from ST7735 import makeg
t = makeg()
else:
t = pyb.TFT("x", "X1", "X2") #makegp()
t.initg()
t.fill(0)
2014-11-03 23:02:34 +00:00
2014-11-13 13:21:41 +00:00
import TFT
TFT.run(t)
2014-11-03 23:02:34 +00:00
def tst( aColor ):
s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-=_+[]{}l;'<>?,./!@#$%^&*():"
2014-11-13 13:21:41 +00:00
# t.text(Point(0, 0), s, aColor, basicfont)
# t.text(Point(0, 40), s, aColor, seriffont)
t.text((0, 40), s, aColor, terminalfont)
2014-11-03 23:02:34 +00:00
# tst(BLUE)
def s(aRot, aColor):
2014-11-13 13:21:41 +00:00
t.rotation(aRot)
2014-11-03 23:02:34 +00:00
tst(aColor)
2014-11-13 13:21:41 +00:00
# from bombs import bomber
# t.rotation(2)
2014-11-03 23:02:34 +00:00
# b = bomber(t)
2014-11-13 13:21:41 +00:00
# b.run()
from level import Level
2014-11-03 23:02:34 +00:00
l = Level(t)
l.run()
2014-11-13 13:21:41 +00:00
# sd = SonarDisplay(t, "X3", "X4")
# sd.run()