1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
-
-
-
-
-
-
-
-
-
- camp_pink = (251, 72, 196)
- camp_green = (63, 255, 33)
-
-
- from qr_tmp import qr_data
- from img_tmp import img_data
-
- from solid import Solid
- from life import GameOfLife
- from net import CheckHTTP
- from qr import QRScreen
- from scroll import ScrollText
- from splash import SplashScreen
- from manager import Manager
- from pico import PicoBatt
-
-
- url = "http://www.xythobuz.de"
-
- scroll_speed = 10
-
- import util
- i = util.getInput()
- t = util.getTarget(i)
-
-
-
- splash = SplashScreen(t)
- t.loop_start()
- splash.draw()
- t.loop_end()
-
-
- success = Manager(t)
- success.add(ScrollText(t, "Visit UbaBot Cocktail machine at FruBar village for drinks!", "bitmap8", 1, scroll_speed, camp_green))
- success.add(Solid(t, 1.0))
- success.add(QRScreen(t, qr_data, 30.0, "Drinks", "bitmap6", camp_pink, (0, 0, 0)))
- success.add(Solid(t, 1.0))
-
-
- fail = Manager(t)
- fail.add(ScrollText(t, "#CCCAMP23", "bitmap8", 1, scroll_speed, camp_green))
- fail.add(Solid(t, 1.0))
- fail.add(ScrollText(t, "The UbaBot Cocktail machine is closed. Please come back later!", "bitmap8", 1, scroll_speed, camp_green))
- fail.add(Solid(t, 1.0))
- fail.add(GameOfLife(t, 20, (0, 255, 0), (0, 0, 0), None, 2.0))
- fail.add(Solid(t, 1.0))
- fail.add(ScrollText(t, "Your advertisement could appear here. Open a Pull Request on git.xythobuz.de/thomas/rgb-matrix-visualizer or send an e-mail to thomas@xythobuz.de", "bitmap8", 1, scroll_speed, camp_green))
- fail.add(Solid(t, 1.0))
-
-
- d = CheckHTTP(url)
- d.success(success)
- d.fail(fail)
-
-
- m = Manager(t, i)
- m.add(QRScreen(t, img_data, 15.0, None, None, (255, 255, 255), (0, 0, 0)))
- m.add(Solid(t, 1.0))
- m.add(d)
- m.add(Solid(t, 1.0))
- m.add(ScrollText(t, "Need to print something? FruBar village has a 3D printer. Come by!", "bitmap8", 1, scroll_speed, camp_pink))
- m.add(Solid(t, 1.0))
- m.add(PicoBatt(t, 5.0, 5.0))
- m.add(Solid(t, 1.0))
-
- m.restart()
- util.loop(t, m.draw)
|