Skip to main content

Questions tagged [python]

Python is a general-purpose, dynamically typed, object-oriented high-level programming language. Interpreters for versions 3.x and 2.x come installed on the Raspberry Pi's most popular operating system distributions.

0 votes
0 answers
10 views

Why isn't the display environment starting with this script at boot?

I have a Raspberry Pi 4 running Debian GNU/Linux 12 (bookworm) I have a Python script in a shell file launcher.sh (with executable for all permissions) that runs happily without complaint if I ...
Dribbler's user avatar
  • 111
0 votes
1 answer
21 views

Converting pigpio code to Gpiod library python

I have the following code of pigpio library and I have to convert it's functionality using gpiod library. Where pigpio has a good documentation I can understand the working of previous code using that....
farhan jatt's user avatar
0 votes
2 answers
43 views

ModuleNotFoundError: No module named 'libcamera'

I have a Zero 2W and OS Lite 32-Bit inside. All I want is a python program that sends camera footage with UDP protocol and saves footage SD card inside as a video. So I wrote this program which worked ...
Yağız Alp Ersoy's user avatar
0 votes
0 answers
32 views

How to control PWM device (more specifically a servo) without using any external modules (preferably with sysfs)

I’m writing a GPIO Python module from scratch. I’ve managed to write code to (in theory, I haven’t tested it on my Pi yet) turn pins on and off, and to read from pins, but for my project (and probably ...
Giwby Albatross's user avatar
1 vote
0 answers
20 views

Interfacing pins while in conda environment

I'm using a raspberry pi 5 to interface with a camera whose python library only goes to 3.10, so I made a conda env with 3.10 to work with that library. I'm trying to access the pins at the same time, ...
brennanhoppa's user avatar
0 votes
0 answers
26 views

How can I set the display environment variable on a Raspberry Pi at boot? [closed]

I have a Raspberry Pi 4 with a 1280x800 display and no keyboard or mouse. I ssh into it remotely over WiFi and am coding it to display images, ultimately on its own without my ssh into it. I installed ...
Dribbler's user avatar
  • 111
0 votes
0 answers
26 views

PWM nozzle with Adafruit TIme of FLight Sensor - Nozzle turns fully on after a while

I'm relatively new to this so apologies in advance. I have a raspberry pi4 with a Bete Ehpi pulse width modulatin nozzle and a Adafruit-Vl53l4cd time of flight sensor. Code below is set to control the ...
Burcin Nalinci's user avatar
-1 votes
1 answer
42 views

Button to Quit While Loop

I've spent the last 2 days all over forums trying to find the right answer to this question and I'm just having no luck with my script! Basically, I'm building a deployable scale for bats - the bats ...
Sasha Newar's user avatar
0 votes
0 answers
22 views

Pi Camera Breaking

I have a raspberry pi 4 and I am trying to connect a Camera Module 3 to the board. The Camera will work for a while, and then will stop working and will be bricked. The only time that I can see it ...
Tenat's user avatar
  • 1
0 votes
1 answer
55 views

"GPIO busy" How to use the same gpio pin in separate processes?

I had a Pi Zero. I broke it and the SD card, then bought a Pi Zero 2 and installed raspbian v 12 (bookworm). Now when I try to import devs.py in separate processes, I get lgpio.error: 'GPIO busy'. ...
Lord Elrond's user avatar
-1 votes
0 answers
21 views

Software I2C - Is it normal to read more than once?

I am using smbus2 to perform write read operation. Occasionally, I can see the write read read as shown below. Even though first read is NACK, is it an expected behavior of smbus2 or software i2c that ...
Sam's user avatar
  • 131
0 votes
2 answers
34 views

Use Pi A to SSH into Pi B, run Python script that appears on Pi B instead of Pi A

I've got two Pis connected with ethernet cable (both Raspbian Bookworm). I've been using Pi A to control Pi B with SSH. When I SSH into Pi B, I run a Python script. The results appear on Pi A (print ...
browntastic's user avatar
0 votes
0 answers
14 views

error installing miniconda on a raspberry pi 4B

I was trying to install miniconda3 on my raspberry pi, and I keep getting the same error. It can download the bash file from https://docs.anaconda.com/miniconda/, but when I run it, I get "./...
zadagat's user avatar
-1 votes
1 answer
54 views

Why are my motors not working with my Raspberry Pi?

I'm trying to follow this tutorial on how to build a buggy with a Raspberry Pi. I'm using all the same parts except for the Pi and the battery. I am using a Raspberry Pi 4B and an 8.4v battery from ...
Jayden Ma's user avatar
0 votes
0 answers
23 views

RPi.GPIO works on one Pi Zero 2, but not the other

I've got a python script that uses RPi.GPIO to exercise some solenoids connected to two Pi Zero 2Ws. Both are running 64 bit Raspberry PI OS and both are up-to-date (bookworm). On one of them, ...
nsayer's user avatar
  • 360

15 30 50 per page
1
2 3 4 5
217