Quantcast
Channel: Raspberry Pi Forums
Browsing all 1225 articles
Browse latest View live

Python • Re: Python Sounddevice problems

Did you install the venv with access to system site packages? (https://learn.adafruit.com/python-virtu ... nv-details)Also, see the next page to make sure you are invoking sudo properly...

View Article


Python • Re: Issue with GStreamer and OpenCV Integration on Raspberry Pi NoIR...

Hi, so I'm a bit puzzled that your original pipeline works at all:Code: gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, format=YUY2, width=640, height=480, framerate=30/1 ! videoconvert !...

View Article


Python • problems with pwm output from lgpio

I recently upgraded the OS on my pi4b (Latest version of Bookworm) and have been trying to get the lgpio module to control the fan. It works with simple switching on and off but I get no output from...

View Article

Python • Re: problems with pwm output from lgpio

I recently upgraded the OS on my pi4b (Latest version of Bookworm) and have been trying to get the lgpio module to control the fan. It works with simple switching on and off but I get no output from...

View Article

Python • Systemd Permission Denied on .venv directory

I am somewhat new to raspberry PI and this is my first attempt to add a systemd service.I am trying to run a python script at startup.The python script and .venv are in the following directory:...

View Article


Python • Re: Systemd Permission Denied on .venv directory

Maybe add the user (pi) Code: [Service] Type=simple User=pi ...Statistics: Posted by neilgl — Wed Dec 11, 2024 1:32 pm

View Article

Python • Struggling with GPIOZero for Motor Control Using TB6600 Microstep...

Hello everyone,I'm currently working on a project where I’m trying to control a motor using the TB6600 microstep driver and a Raspberry Pi. I’ve been reading through the GPIOZero documentation and...

View Article

Python • Re: Struggling with GPIOZero for Motor Control Using TB6600...

I’ve made progress with getting my motor to move using the TB6600 driver! I’ve successfully implemented the clockwise (CW) rotation, but I’m encountering an issue when trying to get the motor to...

View Article


Image may be NSFW.
Clik here to view.

Python • PN532pi Remote I/O error.

I'm using nearly identical code with the following https://github.com/gassajor000/pn532pi/ ... 43a_uid.py using the I2C option.When calling nfc-list in the console I can see the UID of any card or tag...

View Article


Python • Pigpio alternatives?

Hello, recently i've upgraded from Raspberry pi 4 to pi 5 because the air duct inspection robot project im working on requires two cameras. Also, i've been trying to control the PWM Motors through a...

View Article

Python • Re: Pigpio alternatives?

Also i added a line in the config.txt dtoverlay=pwm-2chanBecause i need both hardware PWM channels.Statistics: Posted by CrabbyPatty — Tue Dec 17, 2024 2:44 am

View Article

Python • Re: pyAudio install used to work, but now gives wheel error

The same thing now happens when attempting install of rpi_ws281x.Using the suggested --use-pep517 option also did not work. Again, some others install fine(e.g. pip install StupidArtnet).And all of...

View Article

Image may be NSFW.
Clik here to view.

Python • How to handle bytearray from NFC Tag Reader

Hello everyone. I'm trying to work with NFC Tags and where able to read not only the UID from the NFC tag but also the data. I get it as a bytearray and don't find a solution, how I would work with...

View Article


Python • Re: How to handle bytearray from NFC Tag Reader

You could convert the data into a str:Code: bytearray(b'\x03\x0c\xd1\x01\x08T\x02enOmega\xfe\x00').decode()But this raises the exception UnicodeDecodeError, which is normal, because it has illegal...

View Article

Python • Cmd problem

HiWhen i run my script from vs code it works but when i try to run it directly from the terminal it says no module named…I have all my packages under a venv in the same directory with the app.py but...

View Article


Python • Re: Cmd problem

Did you activate the venv?If it's a system package (one that's part of the default python installation) did you create the venv with the option to allow those?Statistics: Posted by thagrol — Thu Dec...

View Article

Python • except KeyboardInterrupt error

Hi,I'm having issues with "except KeyboardInterrupt" in the following codeIt brings up an error when run as shown in the second code block. Ant help would be great. Thanks MCode: import socketimport...

View Article


Python • Re: except KeyboardInterrupt error

I'm not a Python expert, but it looks to me that the indent is wrong on the "except..." block. It should be the same level of indentation as the "try:" line, not the "with...:" line.Statistics: Posted...

View Article

Python • Re: How does a u-shaping coder work

Well next time I take the pill tray off I'll take a picture of the bottom. But in the meantime a question would be should I redo the project in Python to run with the raspberry pi or should I keep it...

View Article

Image may be NSFW.
Clik here to view.

Python • Issues with code from Raspberry Camera Guide 2nd edition

Hello,I am attempting to run the following code on an RPiZ 2W loaded with a new image of RPI OS Bookworm Litethe code is as follows:-Code: import timefrom picamera2 import Picamera2, Previewcam =...

View Article
Browsing all 1225 articles
Browse latest View live