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
1answer
375 views

Text overlay over video stream when saving to file system

I'am using raspberry pi zero as controller which communicate over UART with external board with five sensors. What I need is a way to save video stream from raspicam to filesystem with embedded text (...
1
vote
1answer
399 views

Showing an image on screen attached to Pi via SSH

I am running a raspberry pi3b+ via ssh. There is a hyperpixel4 screen by Pimoroni attached to the Pi and it's working fine. I am trying to display an image on the screen attached to the Pi with a ...
0
votes
0answers
10 views

Autostart random video script throws IndexError

I am trying to autoplay a random video from an attached usb volume upon boot on my Pi 4 Model B Rev 1.2. The following Python 3 script works within Thonny, popping a Tk message box with the randomly ...
0
votes
2answers
768 views

pyramid framework on raspberry pi

Before I buy a raspberry pi ( being honest ), I'd like to know if it is possible to run a pyramid python framework from raspberry Pi. If so, then how ? I know LAMP runs on it but at present I am ...
1
vote
3answers
12k views

Serial to USB, no ttyUSB0

I'm trying to open a Serial communication between a Raspberry Pi 3 (model B, running on Raspbian) and a device (a traffic counter to be precise). I've a USB to Serial cable, using the rs232 standard. ...
0
votes
2answers
1k views

How do I Install Kivy for python 3.4 on my raspberry? Is that possible?

The question is on the title XD How do I Install Kivy for python 3.4 on my raspberry? Is that possible? I tried using the https://kivy.org/docs/installation/installation-rpi.html guide but thats only ...
0
votes
1answer
374 views

feh can't display image

I have written a python script that displays the image from the URL. def image_func(link_image): img_cmd = "feh -F %s" %(link_image) os.system(img_cmd) os.system("pkill feh") If I ...
2
votes
1answer
226 views

Stepper Motor Not Responding. Wiring Issue?

I am following the tutorial: But I am using a pi t-cobbler and a Pi 2. I am also using the ULN2803 driver. When plugging a button into the appropriate gpio spots on the breadboard, I am able to run a ...
0
votes
2answers
268 views

How can I stream the pi camera stream from my raspberry with python?

How can I have a stream like rtsp, that is accesible in a program on another computer?
0
votes
1answer
16 views

PiCamera V2 NoIR and AMG8833 thermal sensor mmal_vc_port_enable: failed to enable port vc.null_sink:in:0(OPQV): ENOSPC

Hardware used: Raspberry pi 4b, 4 gb ram, AMG8833 thermal camera, PiCamera V2 noir, ALL brand new, i just bought them few weeks ago. Im trying to do finish a project and i ran into a not that good ...
0
votes
1answer
28 views

Error when installing acconeer-python-exploration

I am trying to install this on my Pi https://github.com/acconeer/acconeer-python-exploration . There are some requirements written in the file requirements.txt that need to be installed first. I've ...
5
votes
2answers
81k views

Reading from serial port [loop]

I would like to read from the USB serial port from time to time in a loop. I can open the port and read data with: import serial ser = serial.Serial('/dev/ttyACM0', 9600) while 1 : ser.readline(...
1
vote
1answer
134 views

Unable to control and count RPM of 2 motors in single python code in raspberry pi

I'm trying to count rpm of dc and controlling its rpm using PID controller motor which I have done successfully in my code as shown below. But when I try to count RPM of 2 DC motors simultaneously in ...
0
votes
1answer
307 views

Button isn't triggering in python script

Software guy here, first time doing hardware. Here is my breadboard setup (yellow is GPIO-8, green is ground): Here is my Python: import RPi.GPIO as GPIO from time import sleep GPIO.setmode(GPIO....
1
vote
1answer
94 views

Raspberry PI random connection interruptions

i am running a raspberry pi B+ headless and losing network connection irregulary. I am living with that since a few years, but now want to fix the problem. What would be a good approach to find out ...
1
vote
1answer
141 views

PIGPIO bit banging UART - SLR to plaintext

I've managed to read UART input by SLRO and SLR commands from pgpiod, however, SLR returns UART bit-banged data in the following format: [number of read bytes] [bytes] http://abyz.me.uk/rpi/pigpio/...
0
votes
2answers
828 views

Ending a camera video stream in Python / threading

I’m very new to Python and have been struggling with the code for a wildlife camera project on the Pi. I’ve managed to get the PIR sensor and automatic camera capture working, but I’d like to have a ...
-1
votes
1answer
153 views

measuring phase difference in 3 phase power

For my ceramics oven I had 3 phase power installed. But power consumption according to the meter is way higher than the nominal 7KW the oven consumes. A friend told me that if the phase (or sinus) is ...
0
votes
1answer
531 views

Tkinter application window in front of Chromium in Kiosk mode

On my Raspberry Pi I have created a tkinter application with one button and configured Chromium to start in kiosk mode. In my python application I set the following: root.lift() root.wm_attributes("...
1
vote
1answer
340 views

Parallax RFID Serial Not reading tags

I am a complete newbie with Raspberry Pi and any type of hardware prototyping. I have been trying to get a Parallax RFID working with my Pi 3. I currently have it wired to the GPIO using BCM and the ...
0
votes
1answer
199 views

Python ide for remote debugging/coding on Raspberry pi 4

Is there any Python Ide available from which we can remotely connect to pi (using ssh) and can write python script or debug from windows. I have already done this using eclipse here but this ...
0
votes
1answer
377 views

Pi Camera recording function needs to loop each hour

I have made good use of this forum over the past year as I have been creating a birdbox with camera for my mother. Until now I have been able to find an answer to all of my questions but this time I ...
0
votes
0answers
25 views

How do I get MySQL-Python?

The tutorial I am using says to use easy_install MySQL-python, I'm getting the error easy_install: command not found. I have tried sudo apt-get install python-setuptools as well as the solutions ...
0
votes
1answer
218 views

How to best handle Raspberry Pi 4 and Smartphone connection over Bluetooth and Python

I would like to accomplish the following task: Interact via a python script with my Raspberry Pi and a Smartphone. For me it doesn't matter so much whether to use Classic Bluetooth or BLE but for user ...
0
votes
1answer
126 views

How to send data from raspberry pi to AVR over bluetooth?

I am searching for a way to send data from raspberry pi to my AVR using HM10 or HC05, both of which are available. What I need to do is to read values from a .txt file and send it from the raspberry ...
0
votes
1answer
1k views

Raspberry Pi error when connecting to Firebase

When I tried from firebase import firebase running in the Python 3 (IDLE) and Thonny Python IDE, it gives an error likes this at the first line: Traceback (most recent call last): File "/home/pi/...
0
votes
0answers
15 views

Model error while running yolo.py file on Raspberry Pi 4 [closed]

I am trying to run the yolo.py file from this forked repository https://github.com/jaskiratsingh2000/yolov5 on the raspberry pi 4. When I use the following command in my windows machine. it totally ...
1
vote
1answer
29 views

PiIR TypeError: unsupported operand type(s) for /: 'NoneType' and 'float [closed]

I use the PiIR module to record infrared light buttons and it works. But when I use piir play I get the following error. Does anyone know how fix that? Keep in mind: I use Python 3.7 and PiIR 0.2.4 ...
0
votes
2answers
2k views

play audio stream when bluetooth connects

I have a Raspberry Pi Zero W and want it to use as an Internet Radio. So I wrote a Python script that connects to my bluetooth speaker and starts a stream. Everything works fine, but i always need to ...
0
votes
1answer
2k views

Minimize active window

Is it possible in python to minimize an active window by name or by focus state and, if so, how? For example: I have an open Chromium browser and run a script in python and for five seconds my ...
0
votes
1answer
568 views

Lighttpd running FastCGI script hangs and give 500 internal error

I'm attempting to use lighttpd and fastcgi to run a small flask application. When I try to start lighttpd, it starts the server just fine, but when I try to connect in the browser, it hangs without ...
0
votes
0answers
16 views

Temperature and Humidity does not print on LCD

I am working with a DHT 11 and LCD. When executing the code, the temperature prints one time on the pc and freezes. It does not print on the LCD though neither. Can I have someone assist me with ...
0
votes
1answer
323 views

Generating single-frequency sound with Python, but no sound is produced

I just got a new Raspberry Pi 4 and am trying to write a Python program that generates a sound that's just one frequency. However, I am having a problem that I cannot hear any sound coming out of the ...
-1
votes
1answer
326 views

gamepad/joystick-> raspberryPi->nrf24l01->arduino; variable confusion between cpp and python

I'm trying to operate an r/c robot with joystick and a raspberry pi running Debian and an nrf24l01 to communicate the joystick commands to the arduino on the robot. I only really need forward/back ...
0
votes
1answer
472 views

Properly installed Kivy on Pi3B won't exit or show mouse/cursor moves

I have set up kivy to where I can successfully launch the demos and even my own hello-world apps on a Raspberry Pi 3B. I have two problems that do not seem to have any good answers on the web at this ...
0
votes
2answers
336 views

Pigpio belt speed encoder

I'm trying to read pulses from an encoder to measure belt speed. My encoder is 500 ppr. I have approx 2400 pulses per meter and I need to measure speeds upto 450 meters per minute. Can anyone help ...
0
votes
0answers
26 views

Switch off/on status led

I´m working on a RGB Status LED combined with shutdown button for Raspberry Pi 4 on a Python script scheduled by crontab. I have 2 red leds, one governed by GPIO2 (when Raspberry is off but supply ...
0
votes
2answers
453 views

Control Raspberry Pi to control an Arduino over Apache

I want to control a Raspberry pi to control an arduino which is controlled by a webpage hosted by apache. I do not know how I would attempt this and if it is even possible. Can anyone please guide me ...
0
votes
1answer
4k views

serial errno 25 inappropriate ioctl for device

I have raspberry pi 3 B+ running latest raspbian-strech lite. i have a max485 ic connected to uart on the gpio. import serial,fcntl, struct ser = serial.Serial( port='/dev/serial0', ...
1
vote
3answers
399 views

How to display gpsd.utc using paint or similar method

I am receiving reliable gps data from my Adafruit gps sensor. I would like to to show the gpsd.utc data across the screen so that it appears like a regular clock. I have the following code which shows ...
0
votes
1answer
41 views

Read binary data from serial port and save in file

I am link modem to pi3 via serial port and configure this port . When i receive data in my python software from serial port and save bytes in file, i note i receive too mutch data , I am receiving ...
-1
votes
0answers
162 views

pip errors out about missing module

I've gone through all the instructions I could find on the net about updating and installing pip/virtualenv etc. I did apt updates and even purged and re-installed python-pip, but it still keeps ...
3
votes
1answer
1k views

Not getting a response from a connected PIR sensor

I have a PIR sensor which I'm using connected to a Raspberry Pi 3 Model B as part of a Magic Mirror project. I'm running this module for the sensor. I've had the Motion Sensor working before, but now ...
0
votes
1answer
386 views

Running openCV C++ file from python in Raspberrypi

I'm creating a object and color detection robot. Here in this case, I'm using C++ to run the camera and process the image with openCV in C++, but before I run the Camera, I want the robot to move and ...
0
votes
3answers
5k views

OpenCV 4 error?

When I run the command python faceDetection.py I get the error- VIDEOIO ERROR: V4L: can't open camera by index 0 Traceback (most recent call last): File "faceDetection.py", line 21, in <module&...
0
votes
1answer
557 views

NameError:Function not defined

I have a class RelayChannel and I want to call the function RelayChannelOn() to this code but I get error : NameError: name 'RelayChannelOn' is not defined. Here is the code where am calling the ...
1
vote
1answer
2k views

Issues with Kivy on Raspberry Pi 3 with 3.5 in Touchscreen

I followed every guide I could find on installing Kivy to Raspberry Pi. My touchscreen works totally fine. Trying to launch various Kivy demos will result in what seems to be a partial launch, but ...
0
votes
1answer
348 views

Setting up the Raspberry Pi as a client on a sever

I'm attempting to give my Raspberry Pi a static IP address on an ethernet network that I am controlling from a Windows machine. I want to be able to send my PI UDP packets directly from my server via ...
1
vote
1answer
22 views

Need script to make scheduled 8 channel relay outputs [closed]

This script fires my relays, but I don't know how to change duration and need it to fire daily to run pump and ozonator for an iso float tank. I'm currently only using GPIO 9 and 10 #!/usr/bin/python ...
1
vote
1answer
305 views

No audio through 3.5mm jack when using QtMultimedia on RPI4B

I am currently trying to run a PYQT5 GUI on my RPI 4B using PYQT5 and its QtMultimedia. I have 2 speakers (running through an amp) connected through the 3.5mm jack (BMC2835 headphones), and while ...

1
2 3 4 5
58