Python RGB Matrix games and animations https://www.xythobuz.de/ledmatrix_v2.html
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

camp_small.py 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/usr/bin/env python3
  2. # ----------------------------------------------------------------------------
  3. # "THE BEER-WARE LICENSE" (Revision 42):
  4. # <xythobuz@xythobuz.de> wrote this file. As long as you retain this notice
  5. # you can do whatever you want with this stuff. If we meet some day, and you
  6. # think this stuff is worth it, you can buy me a beer in return. Thomas Buck
  7. # ----------------------------------------------------------------------------
  8. if __name__ == "__main__":
  9. from splash import SplashScreen
  10. from draw import ScrollText
  11. from solid import Solid
  12. from life import GameOfLife
  13. from net import CheckHTTP
  14. from image import ImageScreen
  15. from manager import Manager
  16. import util
  17. t = util.getTarget()
  18. splash = SplashScreen(t)
  19. t.loop_start()
  20. splash.draw()
  21. t.loop_end()
  22. success = Manager(t)
  23. success.add(ScrollText(t, "TODO"))
  24. success.add(Solid(t, 1.0))
  25. fail = Manager(t)
  26. fail.add(ImageScreen(t, "attention.gif", 0.2, 2, 20.0, (0, 0, 0)))
  27. fail.add(ScrollText(t, "The UbaBot Cocktail machine is currently closed. Please come back later for more drinks!", 2))
  28. fail.add(Solid(t, 2.0))
  29. fail.add(GameOfLife(t, 20, (0, 255, 0), (0, 0, 0), None, 2.0))
  30. fail.add(Solid(t, 2.0))
  31. d = CheckHTTP("http://ubabot.frubar.net")
  32. d.success(success)
  33. d.fail(fail)
  34. t.debug_loop(d.draw)