I'm currently working on a pygame script, which is basically displaying an user interface over a webcam stream. This app is running on raspberry pi, on dual screen via fbcp.
I noticed that a strange rainbow square icon did recently appeared in the upper right corner of the screen.
Looking like this, but smaller :
What is it ? How can i remove the display of this icon ?
Thank you !
I found the answer by myself :
This icon is shown by the raspberry itself to inform about under-voltage issue.
To prevent it from showing, solve the power issue, or remove rpi warnings (not a safe approach), by adding to /boot/config.txt :
avoid_warnings=2
Related
After looking for solution for a week, I ask my question here hopping you can help me.
I work on a python project, using tkinter on a raspberry pi 4. As the raspberry allows me to use two different monitor, i would like to be able to display one window per screen.
My program is very basics. It created two differents windows (window = Tk() and root = tk.Toplevel(window)). I am trying to have window displays on screen 1 and root display on screen 2.
Do you think it is possible with tkinter or an other python library ?
thanks a lot for your kind help
---Edit----
The solution was found thanks to the comments given.
I actually used tk.geomtry to solve it. For those who are interessted :
window.geometry(f'{width}x{height}+0+0') #first window on the first screen
root.geometry(f'{width}x{height}+1920+0') #second window, with +1920 on x to put it on the second screen.
That works perfectly so thank you guys
In raspberry pi using Python is there any way to make a program where according to the place you click on a designed screen actions can be taken and output given accordingly.
I am using the raspbian-jessie os and have a 7 inch touch screen, I want to create buttons on the screen. When I click on a button it should execute a program.
you probably put the wrong tag, there is nothing to do with functional-programming or graphics, and still little relations with whether you are in raspberry pi or something else
you mean you are in linux and got a touch screen, and want to add some indicator on your touch? what desktop are your using, or something to do with the hardware.?
please state your question clear! and don't let me guess your expection
Look into Kivy or Qt. These are the most popular GUI interfaces for Python.
I have the same problem as here: Screen displays only in top left corner of window
The pygame container is messed up by the high resolution retina screen. I have searched around and haven't found any one with an answer other than "change your resolution".
Is it possible to fix this in the game, so that the player doesn't have to fix it themselves? Either fixing the bug in pygame or resizing the resolution when the game starts? Maybe it could work only in fullscreen somehow?
TO CLARIFY: I don't want to have to change the screen resolution manually, but within the pygame-code.
I don't know if you've figured this out at all yet as it's been a while. But you can enable low resolution mode for the pygame window in the Macs application settings. Then you don't have to change your resolution every time. I still haven't figured out how to fix this in code though.
https://support.apple.com/en-us/HT202471
Edit: I'm assuming it's a Mac you're using.
I am afraid there isn't any way. pygame hasn't been updated for a while and I think development has stopped. I ran into the same problem and ended up dealing with using a program called setresx when necessary. The problem can also be fixed by hooking up your computer to an external monitor. I know you can get some portable ones that you can put on the side of your screen.
As to changing the code, as far as I'm concerned it isn't pygame that there is anything wrong with, but technically the screen. That said, you might be able to change the library itself to handle the issue.
I am trying to get / set screen pixels (draw picture, line, circle, box, etc.) without starting x session. i tried google it but no success.
I am new to python. please help
I think the is no way to have graphics without x-session.
The best solution to this is to set boot to desktop and using pygame library create full screen window to draw graphics.
I'm writing a presentation software. I control the presentation on my primary screen, and I display it on the second screen. If the image on the second screen doesn't change after a while, my computer turns off the second screen. Off course, I could simply disable powersaving features on my computer, but what I'd like would be to have my software tell the OS not to turn off the second display when it displays fullscreen on it. How can I achieve that? I'm on Linux, and using Python and GTK3.