Python RGB Matrix games and animations https://www.xythobuz.de/ledmatrix_v2.html
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

camp_small.py 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. camp_pink = (251, 72, 196)
  9. camp_green = (63, 255, 33)
  10. if __name__ == "__main__":
  11. from splash import SplashScreen
  12. from draw import ScrollText
  13. from solid import Solid
  14. from life import GameOfLife
  15. from net import CheckHTTP
  16. from image import ImageScreen
  17. from qr import QRScreen
  18. from manager import Manager
  19. url = "http://ubabot.frubar.net"
  20. import util
  21. t = util.getTarget()
  22. splash = SplashScreen(t)
  23. t.loop_start()
  24. splash.draw()
  25. t.loop_end()
  26. success = Manager(t)
  27. success.add(ImageScreen(t, "drinka.gif", 0.2, 2, 20.0))
  28. success.add(Solid(t, 1.0))
  29. success.add(QRScreen(t, url, 30.0, "Drinks:", "tom-thumb", (255, 255, 255), (0, 0, 0)))
  30. success.add(Solid(t, 1.0))
  31. fail = Manager(t)
  32. fail.add(ImageScreen(t, "attention.gif", 0.2, 2, 20.0, (0, 0, 0)))
  33. fail.add(ScrollText(t, "The UbaBot Cocktail machine is currently closed. Please come back later for more drinks!", "ib8x8u", 2))
  34. fail.add(Solid(t, 1.0))
  35. fail.add(GameOfLife(t, 20, (0, 255, 0), (0, 0, 0), None, 2.0))
  36. fail.add(Solid(t, 1.0))
  37. d = CheckHTTP(url)
  38. d.success(success)
  39. d.fail(fail)
  40. m = Manager(t)
  41. m.add(ScrollText(t, "#CCCAMP23", "lemon", 1, 75, camp_green))
  42. m.add(Solid(t, 1.0))
  43. m.add(ImageScreen(t, "Favicon.png", 0, 1, 10.0))
  44. m.add(Solid(t, 1.0))
  45. m.add(ScrollText(t, "#CCCAMP23", "lemon", 1, 75, camp_pink))
  46. m.add(Solid(t, 1.0))
  47. m.add(d)
  48. m.add(Solid(t, 1.0))
  49. m.restart()
  50. t.debug_loop(m.draw)