Questions tagged [pygame]

a cross-platform python framework including graphics and sound libraries for designing video games.

21 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
766 views

Why won't pygame play sound over Bluetooth when everything else works?

I having trouble getting a program I've written using the pygame sound mixer to play sound to work over Bluetooth. The program is able to work correctly over HDMI audio. The Raspberry Pi has no ...
1
vote
0answers
17 views

Python, pygame.mixer, wait for track to end

A little stuck on the last part of this code. I want a random track to play until the end when a switch is switched. I would like the track to play no matter how many times the switch is switched ...
1
vote
0answers
43 views

pygame small screen missing mousecklicks

I am using a small 2.4" touchscreen with a resolution of 320x240 and I am working with pygame to create a GUI. Strangely I am not recording any mouse click between y position 26 and 35. The problem ...
1
vote
1answer
132 views

Add Touch Mode feature to Minecraft Pi

I have Raspberry Pi 3 Model B+ with 5 inches Display with touchscreen for my challenge [Display works successful!]. I am using Debian Raspberry OS. I am on the file in /home/pi/mcpi/api/python/mcpi/...
1
vote
1answer
112 views

Running pygame and webcam works from command line not when using a service

I am writing a small program for a Museum display that captures a still from a webcam, displays it on screen, waits a few seconds and takes another, loop forever. This all works fine from the command ...
1
vote
1answer
53 views

Raspberry pi zero arduboy

I saw the arduboy some time ago and got quite interested in it. I'd like to know if it is possible, through some kind of os, to make something of the sort with a raspberry pi zero w(make my own games ...
1
vote
0answers
253 views

c310 logitech webcam not closing properly in pygame code

I'm accessing my c310 logitech webcam in python with pygame in an attempt to take pictures and save them. My final goal is to take a new picture every minute for 24 hours to make a timelapse. Here is ...
1
vote
0answers
241 views

Incorrect Pygame touch events from Raspi Display without startx

I have a Clock / Weather / MPD client PyGame application that runs on a Raspi3 with an official Raspi Touchscreen. The app works fine when executed under startx. When started from the command line, ...
1
vote
0answers
281 views

Run brushless motor with esc

I have looked all over the internet on how to run a brushless motor with an esc through RPi.GPIO and have no results. I have tried simply wiring the esc as it is supposed to be and programming it ...
0
votes
0answers
33 views

Is there a way to loop through GPIO pins and a database in python

I have built a set of musical stairs using raspberry pi, motion sensors and python, and a web app to change the instrument using PHP. The python connects to a mysql database storing the instrument ...
0
votes
0answers
14 views

Raspberry Pi pygame play music

I want to play sound on raspberry pi with pygame, it doesn't work on terminal. Later I tried with thonny python ide, it is working but I need it to play on terminal, what can I do?
0
votes
0answers
24 views

No available Audio Device after switch from NOOBS to Raspbian Stretch

my program uses Pygame to play sounds. I used Noobs before and my program worked fine in Thonny. Now, i switched to Raspbian Full Stretch and now I get the error No available Audio Device. I already ...
0
votes
0answers
16 views

Which screen size in Pygame for an 3.5 inch LCD?

i try to fill out my whole LCD screen in Pygame with the best sharp resolution possible. So there is a difference between computer screen and the LCD. My LCD has resolution is 480×320. So choosing ...
0
votes
0answers
18 views

How to send data across usb0 to use in pygame?

So i have a pi3b+ and a zero hooked up to a tft ili9341 display. I can run pygame on boot and it works fine. I have also started using python sockets and successfully sent data (my wlan0 ip) from my ...
0
votes
0answers
21 views

PyGame GUI hidden by program

I am working on creating a graphical program to display two lines of text (a big message and a small message) on my Raspberry Pi Touchscreen using the module pygame. In the basic terminal, I can pass ...
0
votes
0answers
47 views

High CPU usage from PyGame with time.sleep

so I'm running a very rudimentary webcam surveillance program with PyGame, that just takes a picture from the webcam, stamps the time and saves it in an endless loop. (and does some simple date ...
0
votes
0answers
101 views

Pygame initalisation for TFT on /dev/fb1 only succeeds as root

I connected a 320x240 TFT to my Raspberry Pi A+ running Raspbian stretch via SPI and set it up as fbtft_device. It shows up in /dev/fb1 and I can write images to it via pygame. I initialize it like ...
0
votes
1answer
244 views

Display a pygame window on builroot custom linux

I'm using Buildroot 2018.02 to create a custom Linux to run my raspberry pi 3. I'm trying to display a pygame window on the external hdmi screen from command line. So far, I've been able to boot the ...
0
votes
0answers
153 views

photobooth, gphoto2, pygame, problem with saving pictures

Hello recently i downloaded photobooth script that I want tweak a little bit to suit my needs and I tried to edit. #!/usr/bin/env python # Created by br _at_ re-web _dot_ eu, 2015-2016 import os ...
0
votes
0answers
373 views

Running pygame without X results in stuck black screen

I'm trying to run a Pygame app without using X. I have a Raspberry Pi 3 with raspbian Jessie installed with very few modifications. The script I'm trying to run is the following: #!/home/pi/.env/bin/...
0
votes
1answer
1k views

Cannot get pygame to open a wav file

I copied this program from a previous reply on this site: import pygame pygame.mixer.init() pygame.mixer.music.load('beep.wav') pygame.mixer.music.play() while pygame.mixer.music.get_busy()==True: ...