Python RGB Matrix games and animations https://www.xythobuz.de/ledmatrix_v2.html
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

util.py 707B

1234567891011121314151617181920212223
  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. import platform
  9. def isPi():
  10. return platform.machine() == "armv7l"
  11. def getTarget():
  12. t = None
  13. if isPi():
  14. from pi import PiMatrix
  15. t = PiMatrix()
  16. else:
  17. from test import TestGUI
  18. t = TestGUI()
  19. return t