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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
49 views

I am currently trying to control a NEMA 17 stepper motor rated for 1.5A through a DRV8825 driver using a Raspberry Pi 4B for a school project. I was trying to use RPi.GPIO to control the motor but it ...
silkysomen's user avatar
0 votes
0 answers
59 views

I run an open source project called PiFire which aims to provide an open source smoker controller using a Raspberry Pi and some off the shelf hardware. I have used a DSI connected touch screen display ...
Ben Parmeter's user avatar
-1 votes
1 answer
67 views

for a school project, I would like to take measurements of the Earth’s magnetic field using an RM3100 Breakout Board magnetometer from PNI Sensor. I soldered the headers myself onto the pads. I ...
thanatos's user avatar
0 votes
0 answers
40 views

I’m trying to set up wireless communication using two NRF24L01 modules. I’m using a Raspberry Pi 4 Model B as the receiver using the pyRF24 Library and a Raspberry Pi Pico with MicroPython as the ...
Nicolas's user avatar
0 votes
0 answers
45 views

Using the command lsusb i am getting the following output: pi@raspberrypi:~ $ lsusb Bus 001 Device 005: ID 19d2:1405 ZTE WCDMA Technologies MSM ZTE Mobile Broadband Bus 001 Device 002: ID 1a40:0101 ...
YvetteLee's user avatar
  • 127
0 votes
0 answers
47 views

I've being trying to install Mojo a replacement for Python using the instructions here. All goes well until I try to run mojo when it crashes immediately with 2343 external/tcmalloc+/tcmalloc/system-...
Nicholas Walton's user avatar
0 votes
0 answers
66 views

I wrote code for my RPi as below and it was working preatty long time, unfortunatelly after system update buttons Start and Stop does not generate any reaction. What may be the reason and how to fix ...
adamssson's user avatar
0 votes
0 answers
146 views

I'm having trouble using the gpiozero library on my Raspberry Pi. Here's what I've tried: Installed via apt: sudo apt install python3-gpiozero Output: Reading package lists... Done Building ...
Alex's user avatar
  • 1
-1 votes
1 answer
418 views

I'm trying to set up pigpio on my Raspberry Pi 5 (aarch64 architecture running 64-bit Raspberry Pi OS Lite). The installation appears successful, but I can't connect to the daemon from Python. ...
Alex's user avatar
  • 1
-1 votes
1 answer
216 views

I'm using a raspberry pi 5 to read from a dht11 sensor with the signal line connected to gpio pin 26. I tried using the Adafruit_DHT and adafruit_dht libraries, which led to the error messages "...
EskimoJones's user avatar
-1 votes
1 answer
105 views

I am trying to install opencv on my raspberry pi 5 (os: 32-bit lite). I've tried the code to install opencv: sudo apt-get install python3-opencv -y but encounter the error below: The following ...
Alex's user avatar
  • 1
0 votes
0 answers
60 views

I have a PanTilt Hat powered by two servos over i2c. The example code below works fine and the hat mechanism will move smoothly for many minutes until ended by being terminated using Ctrl-C from the ...
Nicholas Walton's user avatar
2 votes
1 answer
120 views

I'm using an Arduino Mega to send data via serial communication to a Raspberry Pi 5. The connection is made through a TTL-232R cable (TTL serial on the Arduino side, USB on the Raspberry Pi side). On ...
bardulia's user avatar
  • 131
2 votes
0 answers
57 views

I'm building a device that if in my Python program the USB speakers are not connected it directs sound only to the headphones but the device works differently in a different mode with not so many ...
Gadgettyke's user avatar
2 votes
0 answers
43 views

I'm working on a custom LIDAR using TF Luna and rotating it using a motor with an encoder for mapping purposes. As the title says, the rotated angle is not being updated to Rviz2 , resulting in a ...
nOTHING's user avatar
  • 21
2 votes
2 answers
111 views

Hi Im working to make a car radio using a RPI5 with this Hat (version carpihat5 pro with dac+) with this project everything goes well but when I tried to add another GPIO pin to turn my amp on to his ...
Grez's user avatar
  • 45
0 votes
1 answer
75 views

This is my first Raspberry PI project. I'm trying it for fun and personal use for my home. I want to mount a device that detects a face from a short distance (maybe 1m and less) and initialize an API ...
ozpanaut's user avatar
0 votes
1 answer
172 views

I'm trying to send data to the RAM of a I2C LCD screen to clear the display (when I switch on the LCD and just after the init stage, many pixels are randomly initialized to 1 and not 0). I'm using ...
bbd 666's user avatar
  • 107
0 votes
2 answers
91 views

I have 11 DS18B20 sensors distributed through my house checking temperatures of all rooms, as well as outside temperature. I check and data log from these every 5 minutes and have been doing so for ...
Nick Colloff's user avatar
-2 votes
1 answer
92 views

I'm working on a project that needs to run headless - I need to run a python script "main.py" within a virtual environment at boot. I decided to use crontab to do this. My crontab line is as ...
Anonymous22249's user avatar
1 vote
0 answers
61 views

Is there a way (over in STM32-land, I would use double-buffered DMA banks) to output waveforms (4 pins in my case, though I'd like to do more) on a Raspberry Pi 5 in a continuous mode that won't go ...
Thor's user avatar
  • 11
0 votes
1 answer
104 views

Hoping someone can help. I am currently doing a school project using a raspberry pi to allow RFID scanning, then a PIN entry then finally a fingerprint scanner, all fetched from an SQLite database. ...
Deborah Kane's user avatar
0 votes
3 answers
250 views

I have a Pi 4 with bookworm, running a python 3 script. The python script generates logging output to stdout (to the terminal) when run from a prompt. I want to run the script from cron and capture ...
tim11g's user avatar
  • 311
1 vote
1 answer
82 views

I'm trying to drive an I2C LCD screen. I know the device address from i2cdetect -y 1 It's 0x3f. I reset the screen by setting LOW and HIGH the RST GPIO 4 (the RST pin is connected to GPIO4). Then I ...
bbd 666's user avatar
  • 107
-1 votes
1 answer
178 views

"I'm trying to get my SSD1306 OLED display working with my Raspberry Pi Pico using MicroPython, but I keep running into this error: Traceback (most recent call last): File "<stdin>&...
Georgevader_Pico's user avatar
1 vote
0 answers
53 views

I have an RPI 4 model B below is my code import RPi.GPIO as GPIO import time # GPIO pin connected to the COIN pin of the coin selector COIN_PIN = 24 # Setup GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(...
Snow Angel's user avatar
1 vote
1 answer
107 views

Im developing some code to run on the Raspberry Pi using GPIO, but most of the time Im on my desktop, where calling GPIO will break the code. I just learned about unit testing, but Im not sure how to ...
Bangor Makerspace's user avatar
0 votes
0 answers
399 views

I’m having trouble running a pygame script on my Raspberry Pi Zero 2W with Raspberry Pi OS Lite. The script is intended to display images directly on the screen. However, I’m encountering errors and ...
Max Delissen's user avatar
0 votes
1 answer
591 views

I'm working on a Raspberry Pi project using Python and the rpi-lgpio library to monitor GPIO events. My setup involves connecting a RadiationD-v1.1 (CAJOE) module to GPIO pin 11 (physical pin 23) on ...
AMAURY's user avatar
  • 9
-1 votes
1 answer
525 views

I have a Raspberrypi 5 running bookworm and would like to run a python script at reboot. The script is in a virtual environment: /home/mipi/venv/Startup/Startup.py (where venv is the root directory ...
Ken's user avatar
  • 1
0 votes
0 answers
40 views

I am using raspberrypi4 trying to run fswebcam from within a virtual env , but i get error when i do so (rasberry-pi-env) rishil@raspberrypi:~/proj $ ./obj-detector.py Traceback (most recent call ...
robol's user avatar
  • 1
1 vote
1 answer
916 views

When I try to install a new python library (using pip) the following message appears error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages ...
Milliways's user avatar
  • 63k
1 vote
0 answers
233 views

I am using a pi 4B with 8GB RAM and bookworm OS and the pi HQ camera. picamera2 returns sensor_mode[0] (below) that should support 60 fps video at 1332x990 image size. If I set camera configuration ...
abeyer42's user avatar
0 votes
1 answer
56 views

I'm having this code on my Raspberry Pi5: import cv2 import numpy as np box_size = (640, 480) spacing = 1 num_rectangles = 4 window_width = 640 window_height = 1200 frame = np.ones((window_height, ...
Fuxi's user avatar
  • 129
0 votes
0 answers
128 views

I’m working on building an ultra-low-latency live streaming application using the Raspberry Pi Camera Module V2. My setup includes FFmpeg for video streaming over UDP to achieve low latency, and ...
Ismail Mansuri's user avatar
-1 votes
1 answer
101 views

I want to send a message using LoRa SX1278 using raspberry pi 4 as a receiver and LoRa SX1278 with raspberry pi 5 as its transmitter. we have downloaded git clone from the following link: https://...
tiara padma's user avatar
0 votes
1 answer
197 views

I have a raspberry pi model 4B. This the os version I have PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)...
SHIVAM SINGH's user avatar
-1 votes
1 answer
100 views

Imagine having built something like Amazon's Alexa yourself. You've used all that nice HTTP / network libraries for Python and other developer-friendly things. Maybe you are also using a Python ...
me.at.coding's user avatar
2 votes
1 answer
1k views

I have a fairly substantial hardware control application that I'm currently running on a RPI 3b. I'm using nearly every pin on the GPIO, including using PWM output, I2C and multiple 1-wire buses. The ...
hollandlef's user avatar
0 votes
1 answer
121 views

I'm having problems with a direct TCP connection between a Raspberry and a Modbus device. If I connect a Fritzbox router in between, I can reach the Modbus device via the PI, but not with a direct ...
Christian Envi's user avatar
0 votes
1 answer
257 views

I am having issues with downloading the openai python module onto a raspberry pi 5. I know I'm supposed to download in a virtual environment first then deactivate and download globally but that hasn't ...
Christian Archer's user avatar
0 votes
0 answers
105 views

I currently have a 600 p/r encoder hooked up to a pi 4. Seems to work ok, but due to the pi OS (bookworm) it usually misses some counts. From what I read, it seems that there are 2 possible ways to ...
Greg W's user avatar
  • 1
0 votes
2 answers
106 views

recently I have acquired raspberry 1 model B for a very cheap price. I want to learn some python on it but Desktop version is super laggy and command line isn't very practical for code writing. I know ...
Dominykas's user avatar
  • 101
1 vote
1 answer
128 views

unattended upgrades is not upgrading the python packages that are available for upgrade. Other packages do get upgraded, for example raspberrypi-sys-mods got upgraded last night. pi@raspberrypi:~ $ ...
Camden Narzt's user avatar
2 votes
0 answers
82 views

I have a python script running in the background 24/7 on a Raspberry Pi. It waits for a GPIO input (IR sensor high for 10s) and triggers a GPIO output (SMS trigger to a router). It uses a locked ...
pierre's user avatar
  • 21
1 vote
1 answer
259 views

I created a executable file on the raspberry pi 3 using pyinstaller. Did the regular changes to the .spec to include my other files and attempted to run it... Nothing. So, I went into terminal and ...
Electrical Computer Man's user avatar
0 votes
1 answer
1k views

I am trying to control a E-Paper display using my Raspberry Pi 5. I want to use the gpiod library since it seems to be the best option (especially since RPi.GPIO is not supported on the Pi 5) together ...
dongxi's user avatar
  • 9
0 votes
2 answers
308 views

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
-1 votes
1 answer
211 views

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
3k views

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

1
2 3 4 5
65