|
@@ -0,0 +1,36 @@
|
|
|
|
+#!./bin/python3
|
|
|
|
+
|
|
|
|
+import sys,os
|
|
|
|
+import yaml
|
|
|
|
+
|
|
|
|
+os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide"
|
|
|
|
+import pygame
|
|
|
|
+from pygame.locals import *
|
|
|
|
+
|
|
|
|
+# Configuration
|
|
|
|
+config = yaml.safe_load(open("config.yml"))
|
|
|
|
+
|
|
|
|
+cfg_fbdev = config.get("fbdev", "/dev/fb1")
|
|
|
|
+
|
|
|
|
+def out(o: str):
|
|
|
|
+ print("-->", o)
|
|
|
|
+
|
|
|
|
+out("Hello %s" % cfg_fbdev)
|
|
|
|
+
|
|
|
|
+# Initialise pygame
|
|
|
|
+
|
|
|
|
+pygame.init()
|
|
|
|
+
|
|
|
|
+# Create the display
|
|
|
|
+
|
|
|
|
+dsp = pygame.display.set_mode((128, 160), 0, 32)
|
|
|
|
+pygame.display.set_caption('Musikautomat')
|
|
|
|
+
|
|
|
|
+# Run the game loop
|
|
|
|
+
|
|
|
|
+while True:
|
|
|
|
+ for event in pygame.event.get():
|
|
|
|
+ if event.type == QUIT:
|
|
|
|
+ pygame.quit()
|
|
|
|
+ sys.exit()
|
|
|
|
+ pygame.display.update()
|