Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
2 views

Setting up Google AI Assistant SDK on Raspberry Pi 4

I have followed the guidelines from https://developers.google.com/assistant/sdk/guides/service/python on how to set up Google AI Assistant SDK's and am trying to get it working on my Raspberry Pi 4. I ...
austin Gelatt's user avatar
0 votes
0 answers
6 views

Running php and python scripts on webserver

on my Raspberry 4 (running on Bookworm) I made a few .html, .php and .py scripts and run them on webserver created by "php -S ip:port" command. In this way everything works just fine. Now I ...
pan_tarej's user avatar
-1 votes
0 answers
11 views

SpeechRecognition library error in raspberry pi 4

i want use speech recognition library. I've tried many different methods. use a venv reinstall library (pyaudio, python, SpeechRecognition, python3) However, there's still a problem here as below. ...
HyunJoon Lee's user avatar
0 votes
3 answers
63 views

trying to do the project musicfig problem with python-usb

I'm currently trying to do the project made by Dennis Mellican about using a raspberry Pi with the lego dimension platform. He made a step by step guide here https://codeburst.io/my-lego-minifigures-...
loic's user avatar
  • 3
0 votes
0 answers
35 views

Controlling bluetooth with a python script

I have a raspberry pi 4 model b running Raspberry Pi OS Lite 64-bit with Operating System: Debian GNU/Linux 12 (bookworm) Kernel: Linux 6.6.20+rpt-rpi-v8. I have to control the Bluetooth of the ...
Plat00n's user avatar
0 votes
0 answers
15 views

raspberry pi bluetooth not showing up on Mac

I have a bluetooth server that I wrote in python running on a Raspberry Pi Zero, and it works great. I can connect to it from my iPhone and I have python code that connects to it running on my Mac. ...
CrabbyPete's user avatar
0 votes
0 answers
14 views

Blue screen appearing on webcam server of raspberry pi.?

Motion version 4.3.2 is used. If i edit the configuration file according to version 4.1.1 will it work? or is there anyother solution
zig zag's user avatar
0 votes
1 answer
83 views

Raspberry Pi 4: Python - RuntimeError: Error waiting for edge

I am trying to get the falling edge of a HB100 doppler radar with a Lm358 amplifier module. The error is RuntimeError: Error waiting for edge It was working great and stopped suddenly. I have already ...
GuiDupas's user avatar
  • 117
-1 votes
0 answers
46 views

reading duration of a signal using PIGPIO

I have a device that continuously sends the signal of different pulse widths. I am trying to read those pulse duration and build my logic to further implement it. It is a synchronous signal. I am ...
John Mist's user avatar
0 votes
1 answer
31 views

USB Python Script Issue Raspberry Pi OS

I'm encountering an issue where I'm trying to trigger a Python script in the background upon plugging in up to four USB devices, all with the same USB vendor and product IDs. To accomplish this, I've ...
Figaro's user avatar
  • 1
0 votes
0 answers
28 views

'make' command not working on my Raspberry Pi while compiling the SocketCAN driver

Problem: When running "make" command I am met with errors I've been trying to install a SocketCAN driver on my pi device so I can communicate with a USB CAN Adapter. I've been following ...
user162422's user avatar
0 votes
0 answers
19 views

Reading from MT6816 magnetic encoder with SPI connection using Python on Raspberry Pi 4

I am totally new to the field, don't really know what I'm doing and in need of help. I'm trying to read an absolute angle using an MT6816 14-bit magnetic encoder via SPI connection using Python on ...
Kannidhis's user avatar
0 votes
0 answers
19 views

Python - Way to interact with GUI by executing start - Raspian OS

I want to interact with the GUI of my display(Open an image every time I press a button that I have interfaced via GPIO) via a python script which is executed after bootup. (I have edited crontab file ...
harsh's user avatar
  • 1
0 votes
0 answers
27 views

Pi4 python OpenCV timeout

I have been having some issues with getting a video stream from my cameras on my Pi4B. I am running this on Python. I have been getting the error; VIDEOIO(V4L2:/dev/video0): select() timeout with the ...
Dwayne David Wallace's user avatar
0 votes
0 answers
24 views

Can't install RPLCD on rasberry Pi

I can't install module RPLCD on Python 3.11.2 I tryed "pip install RPLCD" = no command "pip", tryed "pip3 install RPLCD" - no results. I also tryed "apt install ...
Mikhail's user avatar
0 votes
0 answers
32 views

rc. local not working

I have an issue with opening Python script at startup. I have added python /home/serhii/Desktop/Packed/Hello.py & to rc.local and the script does not open. But, the command sudo pigpiod is working....
SPS's user avatar
  • 1
0 votes
0 answers
22 views

Problem when testing module DAC MCP4922 with Raspberry Pi

I'm encountering an issue while testing a custom-designed DAC module that utilizes an MCP4922 chip as its primary processor. The vendor provided C language test code for ESP32-S3, but I intend to test ...
Hien_lee's user avatar
0 votes
1 answer
26 views

ESC, BLDC control with pigpio: set_PWM_dutycycle or set_servo_pulsewidth, and other ESC questions

I am new to Raspberry Pis. I am using a Raspberry Pi 4. I am trying to control a BLDC motor from the BLHeli_32 ESC, using PWM signals output from GPIO pin 18. For this project, I need the motor to go ...
Tsz Kit Koon's user avatar
0 votes
1 answer
115 views

import picamera2 module not found when run in script with python3.8

Why would it be that a module could be imported via command line, but not via script? As you can see below, I can import picamera2 in the first attempt via terminal, but when I'm running scripts the ...
MichaelC's user avatar
-2 votes
2 answers
39 views

How to stream video from the RPi to a web browser in realtime?

How to stream video from the RPi to a web browser in realtime? I need help please for my surveillance robot 😭🙏🏻
Baraa Atouani's user avatar
1 vote
2 answers
1k views

RPi.GPIO RuntimeError: Failed to add edge detection

I ran a python script on a Raspberrypi 4 on Raspbian Bookworm for a ups (uninterruptible power supply) quite a while. Since the latest update of bookworm the script fails. Since the script of the ups ...
uenz's user avatar
  • 59
0 votes
1 answer
50 views

"Most direct" way to display an image on Official Display from Python

I have a Raspberry Pi 4 connected to an Official 7' Touchscreen Display that I want to display some data on, ideally from a Python application. What is the "most direct" way to go from an ...
Scott's user avatar
  • 101
0 votes
0 answers
34 views

Slow tkinter app loading and choppy mouse

I have a raspberry pi 5 running a python app that uses a customtkinter UI and TCP client running on a thread along with some serial port IO on another thread. The app loads in around 15 seconds and ...
Ohbhatt's user avatar
0 votes
0 answers
18 views

GPIO not performing program operations

I'm working on tensorflow lite project with custom models. I'm making a conveyor belt to detect and remove defective items which are trained by me. My camera detects object but when it comes to make ...
namaaa's user avatar
  • 1
0 votes
0 answers
16 views

RPi 5 Code Does Not Work Without Root

I have a code. Because it is very long (2500 lines) I can not throw it here but here are the libraries: import sys import datetime import locale import serial import time import os import cv2 import ...
MEnsar55's user avatar
0 votes
1 answer
399 views

RPi 5 PyQt5 Install Error

I need to download PyQt5 for a project on my Raspberry Pi 5. I opened a Virtualenv and downloaded other libraries. But I got the following error when downloading PyQt5. Looking in indexes: https://...
MEnsar55's user avatar
1 vote
0 answers
39 views

Changed cameras, now it's not working

Following tutorials I got a basic first step program working with the Pi Camera Module 3. Then needed to switch cameras to the Arducam x519, and now it terminates itself at the first line. I followed ...
Derian Magness's user avatar
0 votes
1 answer
37 views

Writing bash script to reboot pi 10 times and log output

I have written a Python script and scheduled it to run @reboot using cronjob. Sometimes this script throws an exception sometimes it works perfectly. I want to write test scripts for this. Preferably, ...
Osama Khalid's user avatar
1 vote
0 answers
39 views

Using a camera and getting a big block of errors I don't understand

So far I've just been following tutorials to set up the camera to do more complex things later, but I always get this block of errors (below). I've tried googling the errors and haven't found anything ...
Derian Magness's user avatar
0 votes
2 answers
107 views

Run python script as systemd service

I'm trying to invoke a python script as a service AND send it's output to a logfile. I created the following file; /etc/systemd/system/rfsensor.service, with contents: [Unit] Description=rfsensor ...
NigelS's user avatar
  • 3
0 votes
1 answer
91 views

Why did my servo motor break when controlling it from a raspberry pi?

I was trying to control a Tower Pro SG-5010 servo motor using a Raspberry Pi 4, with the python code below, but after working for a minute or so, the servo started not turning for some of the commands,...
guest1253's user avatar
0 votes
0 answers
14 views

Best environment for interactive installation?

I'm gathering some hardware for a permanent interactive wall installation that will utilise Pi 4 and some touch sensors via GPIO. The Pi will be hooked up to a video projector and a speaker. The idea ...
ALx's user avatar
  • 101
0 votes
0 answers
30 views

LEDs in 8x8 matrix triggered in unexpected order

I have bought a pre-built 8x8 LED matrix powered by an ht16k33 and connected it to a Raspberry Pi 3b. I have created the following test program, which should turn on each of the LEDs of an 8x8 matrix ...
drewb's user avatar
  • 1
0 votes
0 answers
45 views

Timeout Issues in PySerial. Arduino randomly starts timing out

from get_connected_arduinos import get_arduinos serial_devices = [] def initialize(serial_device): print("initializing", serial_device) try: serial_device["serial"...
UnityBug's user avatar
0 votes
0 answers
27 views

I’m using Raspberry Pi 3B and having an error for running tflite

Here is the error Traceback (most recent call last): File "/home/pi/tflite1/TFLite_detection_webcam.py", line 122, in <module> with open(PATH_TO_LABELS, 'r') as f: ...
Erwin's user avatar
  • 1
0 votes
1 answer
228 views

Hosting a lavalink server and connecting to it at the same time fails

I am running a discord bot that requires voice commands in my Raspberry Pi 4, and installed OpenJDK 17.0.1 on it. I also used pyenv to install python 3.10 on the Pi, and set the version to be global. ...
LuckElixir's user avatar
-1 votes
1 answer
32 views

Python script started by crontab ends immediately

I'm trying to start a python script using crontab that runs in the background. I want to restart it every few hours, but for now I'm trying to test it every minute to make sure the crontab is working. ...
ad01's user avatar
  • 1
0 votes
2 answers
41 views

Cronjob not executing when raspberry pi reboots

The following is the Python script that I want to execute every time Raspberry Pi reboots. When I run this Python script directly from the terminal it works. Not only does IP gets stored in the file ...
Osama Khalid's user avatar
1 vote
0 answers
64 views

Transmit data from LoRa connected to Raspberry Pi

I am working on a project related to data transmission between nodes and a gateway. Currently, I am using 2 ESP32s and 1 Raspberry Pi 3B+ as nodes, and another Raspberry Pi 3B+ as the gateway. The ...
Hien_lee's user avatar
0 votes
0 answers
31 views

ALSA lib PyAudio Errors with ReSpeaker v2.0 USB Mic Array and Raspberry Pi 4B

I have been having problems using the pyaudio library to access raw audio data from the ReSpeaker Mic Array v2.0 microphones. The example script below is provided from the link above, and it's ...
Cole Sheyka's user avatar
1 vote
0 answers
133 views

Raspberry Pi 4B & ReSpeaker v2.0: PyAudio Errors and ALSA Configuration Issues

OS: Raspberry Pi OS (64 bit) - Debian Bookworm As a forewarning, I am a novice when it comes to IoT projects like this. My purpose is to implement my own custom python script which considers direction ...
Cole Sheyka's user avatar
0 votes
0 answers
55 views

Freezing in Raspberry Pi 3B+

I would like to inquire about the circumstances under which the Raspberry Pi 3B+ may experience freeze when connected to multiple devices via an Ethernet gateway (each of these devices having ...
Hien_lee's user avatar
0 votes
0 answers
151 views

How to enable a fastApi server on startup?

im looking for solution, how to edit some files to specify which bash file (it's called startupScript.sh) should start after booting the device. I'm using bash version, without GUI. But the script ...
M0nk3y's user avatar
  • 1
0 votes
1 answer
51 views

Delay on Raspi about 58 us and 100 us

Does anyone know how to make delay on raspberry pi until 58 us and 100 us? I am using raspberry pi 4B with python language. I want to make code for sending packet data (I will include my code). I'm ...
Naufal Yanu Kusdianto's user avatar
0 votes
1 answer
76 views

Autostart a Python UI to a DSI display

for a little project I have build a Python UI which should autostart on a Raspberry PI4 that has a DSI touch display connected to it. I'm currently running Raspbian on it but that can be changed if ...
Grogak's user avatar
  • 1
0 votes
1 answer
66 views

RPi GPS Hardware for project [closed]

I am thinking about a Rpi project that detects and triangulates radio signals with a directional Yagi Antenna, CMPS14 (to work out which compass direction the antenna is pointing) and a GPS to get ...
Al Grant's user avatar
  • 103
0 votes
0 answers
86 views

How to get TLS 1.3 support in Python3.4 on Raspbian Jessie?

I have some very old Pi 3Bs installed in the field that are running Raspbian Jessie and openssl version 1.0.1t. I believe Buster was the first to include TLS 1.3 and doing an upgrade from Jessie to ...
Pathead's user avatar
  • 283
0 votes
0 answers
27 views

how to start a tkinter GUI before the login window on raspberry pi4 b

I Have a raspberry pi 4B running using Debian GNU/Linux 12. I created an executable file as GUI. I want to start this GUI before the login window appear and when ever the user close it the login ...
georges's user avatar
0 votes
1 answer
33 views

How can I use a RPi interfacing with a Python program to count PWM pulses in the 0-40 khz range?

How can I use a RPi interfaced with a Python program to count PWM pulses in the 0-40 khz range? The Pi would not be generating the pulses. I don't see any similar questions. I am a total newbee to ...
MORTIMER SCHNERD's user avatar
0 votes
1 answer
54 views

Raspberry Pi Sound to Light

So, I am building a Dalek and instead of buying a hardware voice modulator, we have managed to use the Raspberry Pi to take sound from a USB Mic - apply a live sound effect and play the amended sound ...
Bill Harvey's user avatar

1
2 3 4 5
66