Python • Pyglet + ModernGL + Raspberry Pi 5
I recently tried Raspberry Pi for the first time, and I tried to make a simple app using ModernGL as the rendering backend, and ModernGL Window to show the app display.ModernGL Window uses Pyglet as...
View ArticlePython • send .bin file via USB Port
Hi Guys,last year I set up a demo Raspi with 3 printers.Setup1xRaspi 3b+ (headless)3x thermal printer3x Button connected via GPIO3X bin. filesWhen the Raspberry Pi is powered on, it automatically...
View ArticlePython • Re: send .bin file via USB Port
Depending on the printer, there may be a /dev/usb/lp0 that you can write the bin file to.Statistics: Posted by rpdom — Wed Jan 22, 2025 3:08 pm
View ArticlePython • 2 python scripts with SQLite3
Hi All,Relatively new to Raspberry Pi and Python, but so far forum info has been really helpful in getting me up to speed relatively quick.However, I have a query about best process for this...
View ArticlePython • Change sleep duration of a loop without restarting it (use a...
Would it be possible to change the duration of a sleep step in a code that is already running? Could I have it import the variable from another script that I could update without interrupting the...
View ArticlePython • Re: Change sleep duration of a loop without restarting it (use a...
Adjustable loop time is possible, but at some cost of code lines.Here a sample, needs some more refinement to handle thread safety. But it demonstrates the basics.The code is replacing time.sleep() in...
View ArticlePython • Re: 2 python scripts with SQLite3
If separate scripts need to modify the data then I would expect problems with sqlite. Options are- simple: migrate to another database like mariadb. Can work with multiple programs which read/update...
View ArticlePython • Re: tkinter display issues switching between frames
I'm not finding it easy to follow your code.When I want to switch between frames I use code like this:Code: frame1.lower()frame2.lift()I don't know if that would help you.Statistics: Posted by buteman...
View ArticlePython • Anaconda -> Python 3.12
The recall someone was asking about getting Python 3.12 on a Raspberry Pi a while ago. By default, Bookworm comes with Python 3.11Last night I installed Anaconda and now it comes with Python...
View ArticlePython • learning about asyncio with rotary encoder
Hi,I am attempting to learn about asyncio with a rotary encoder project. I am not a born programmer so although I have read much of the theory on asyncio, much of it still looks like black magic to...
View ArticlePython • python alarm program, -resource issue?
HiI have made a python alarm program, with a simple input switch to activate/ deactive the alarm.Including some time delay, when activating alarm, and also when setting off the horn when PIR detects...
View ArticlePython • Re: python alarm program, -resource issue?
What doesn't work ? Does it not start ? Does it not trigger ?Statistics: Posted by gordon77 — Sun Jan 26, 2025 7:08 pm
View ArticlePython • Re: learning about asyncio with rotary encoder
Mixing async with sync code is not simple. One solution is to switch from using asyncio to using threads. Assuming you want to stay with asyncio, perhaps the simplest solution is to create an async...
View ArticlePython • Rasberry Pi4 vlc audio out
I bought a 7" touch screen with 2 speakers. I was having trouble getting the audio working as HDMI output with my python code. Code: #!/usr/bin/env pythonimport osimport vlcimport RPi.GPIO as...
View ArticlePython • Re: Rasberry Pi4 vlc audio out
In journalctl I see 0225bff0] vlcpulse audio output error: PulseAudio server connection failure: Connection refusedJan 27 10:57:18 raspberrypi4 SRV_PLAY[1430]: error: XDG_RUNTIME_DIR not set in the...
View ArticlePython • MousePosition with pyautogui does not return the correct value
Hi,I try to get the mouse position on the whole screen with pyautogui. The Raspberry pi 4 is completely updated with OS without any errors.pyautogui is installed on a venv or directly with...
View ArticlePython • Rasp pi Pico wont work once soldered to headers
Hi, first time using this forum.Setting up pico and went through the setup on thonny, got the onboard led to turn on etc. Soldered half the header pins on and it still worked. Finished the other side...
View ArticlePython • Re: Rasp pi Pico wont work once soldered to headers
So, let's dissect this because your problem may not have anything to do with solderingSetting up pico and went through the setup on thonny, got the onboard led to turn on etc. Soldered half the header...
View ArticlePython • Unable to import cv2 on OpenCV installation
I am trying to access the OpenCV library. I have successfully installed opencv-python but when I call import cv2, it fails with error “ImportError: libclas.so.3: cannot open shared object file: No...
View ArticlePython • Re: Unable to import cv2 on OpenCV installation
Are you using a python virtual environment (venv) on the Pi ? and is it running Bookworm 64-bit?Statistics: Posted by neilgl — Wed Jan 29, 2025 8:20 pm
View Article