Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8013

Media centres • Re: Peppy player

$
0
0
The easiest way to test the player is to install one of the latest disk images: https://github.com/project-owner/PeppyP ... isk-Images
Though that will install it with Raspberry Pi OS (32-bit) Lite 07/04/2024 (Bookworm).

The easiest way to make sure that display and touch functionality works is to install the Pygame library and try these two test programs. The first will draw the line, wait for 5 seconds and exit. The second will print to the console touch events. It would be helpful if you could test it with OS Lite version. Thanks!

Code:

import osimport pygameimport timepygame.init()print(pygame.display.get_driver())w = 720h = 480lcd = pygame.display.set_mode((w, h))lcd.fill((0,0,0))pygame.display.update()pygame.draw.line(lcd, (30,80,200),[0,0],[w - 1, h - 1],4);pygame.draw.circle(lcd, (255, 255, 255), (w/2, h/2), 80)pygame.display.update()time.sleep(5)

Code:

import pygameimport timepygame.display.init()while True:    for event in pygame.event.get():        t = event.type        if t == pygame.FINGERUP:            print(f"up x:{event.x} y:{event.y}")        elif t == pygame.FINGERDOWN:            print(f"down x:{event.x} y:{event.y}")        elif t == pygame.FINGERMOTION:            print(f"motion x:{event.x} y:{event.y}")        else:            print("unknown")    time.sleep(0.1)

Statistics: Posted by peppy.player — Fri Nov 22, 2024 3:48 pm



Viewing all articles
Browse latest Browse all 8013

Trending Articles