Python • Use QGlPicamera2 and QOpenGLWidget Together
I am developing an application for Raspberry Pi 5 that needs to render video from a camera on the screen while also displaying real-time graphics.I can achieve this in two ways:- creating a...
View ArticlePython • boolean conversion problem
Hi,I try to read bit by bit from a binary data type, created from a decimal number.The idea is to get bit by bit, convert it to boolean and print the corresponding value, true o false.I try to get...
View ArticlePython • Re: boolean conversion problem
Because d is a string?Code: a=5b=bin(a)print(b,type(b))c=b[-1:]d=b[-2:-1]e=b[-3:-2]print(c,bool(c))print(d,type(d),bool(int(d)))print(e,bool(e))Statistics: Posted by rpiMike — Thu Dec 05, 2024 4:51 pm
View ArticlePython • How does a u-shaping coder work
I'm currently in the process of trying to rebuild a hero pill machine but one second hand in it was locked. It uses three stepper motors a pump and a bunch of u-shaped encoders. I got all of the...
View ArticlePython • Re: How does a u-shaping coder work
I'm currently in the process of trying to rebuild a hero pill machine but one second hand in it was locked. It uses three stepper motors a pump and a bunch of u-shaped encoders. I got all of the...
View ArticlePython • PiGPIO Pin Factory
Hello, i am a relatively new raspi user. I'm trying to simply rotate a servo (ES08AII if it matters) with GPIOzero; but when i try to run the code:Code: from gpiozero import LED, ServovPin =...
View ArticlePython • Re: PiGPIO Pin Factory
Usually the 'installed' library source code in dist-packages should not be changed. There is a programmatic way to change the pin factory described in https://gpiozero.readthedocs.io/en/stab ......
View ArticlePython • Re: KeyboardInterrupt return error with serialposix.py
MASTER.pyCode: try: LDR_only()except KeyboardInterrupt: print("\nYou hit CTRL+C, Bye bye!")Statistics: Posted by memjr — Fri Dec 06, 2024 3:22 pm
View ArticlePython • PulseAudio and Root User Headaches
Hi All, Been working on a PI Camera Project where I use python and the picamera2 library on a PI5 to write a mp4 file with audio. Worked great, until I wanted to create a cron tab to startup the...
View ArticlePython • Re: PulseAudio and Root User Headaches
I've had issues with crontab and sound. The sound service isn't started yet.I cheat, but some users here don't like it.Is it possible to wait for the GUI to start and use autostart?Edit: I presume you...
View ArticlePython • pyAudio install used to work, but now gives wheel error
Hello all. I'm installing PyAudio on a RasberryPi Zero 2W, headless, with Raspberry Pi OS Lite (64-bit). (12, Bookworm).A few months ago, I did this successfully in a venv after I figured out I had to...
View ArticlePython • Weather Station RPI BME 280
Hi AllNewbie here, I want to build a weather station with the Pi.I am going to use this guide: https://projects.raspberrypi.org/en/pro ... -station/1I have got the weather station software cloned.When...
View ArticlePython • Re: Weather Station RPI BME 280
If we are using Bookworm we need to create a python virtual environment (venv) to pip install the python library.Create the venv with system packages like this:Code: mkdir my_projectcd...
View ArticlePython • how to edit Thonny stdout colours
Where are the Thonny theme config files stored on the rPi? I'd like to edit the stdout foreground and background colours. I know you can set them with escape/ansi codes and various libraries, I want...
View ArticlePython • Python Sounddevice problems
Hi guys, I'm currently working on a project where i have a RPi 5 that runs a python script to genreate sound and output it using a blutooth speaker.I have a virtual environment on my RPi that has all...
View ArticlePython • SparkFun Auto pHAT
I tried to import qwiic to python3 to use sparkfun auto phhat to run srvo motor, but I received an error Invalid driver class name. Unable to locate QwiicAs6212Invalid driver class name. Unable to...
View ArticlePython • Re: SparkFun Auto pHAT
Did you Google the error message?https://stackoverflow.com/questions/527 ... aspberry-wStatistics: Posted by ame — Mon Dec 09, 2024 2:44 am
View ArticlePython • Re: YOLO error when startup
You should check if you're using the same Python environmentStatistics: Posted by Y-T-G — Mon Dec 09, 2024 4:56 am
View ArticlePython • Re: Multiple python scripts in virtual environment
Many thanks, thagrol. That answers my questions and saves me a lot of experimenting! Statistics: Posted by Reillysdad — Mon Dec 09, 2024 1:47 pm
View ArticlePython • Issue with GStreamer and OpenCV Integration on Raspberry Pi NoIR...
I am using a Raspberry Pi 4 with the Raspberry Pi NoIR Camera v2. The camera works perfectly with libcamera commands, and I can view the video stream without any issues. However, when trying to use...
View Article