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.

690 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
580 views

opencv and cv2.so/libcv2.so setup for python

I installed opencv 2.4.8 on my raspberry-pi. But i am not able to locate cv2.so /libcv2.so so that whenever i import i get error as cv2 not found. Is there a way to download theese packages to use in ...
1
vote
0answers
112 views

how can I export 'Motion - Conversion Specifiers' to use it in a python program? Raspberry Pi

I'm using motion in a Raspberry Pi and need export the coordinates of the center of the moving object (the %K and %L) because I want to use it in a python program. But I can't even make the ...
1
vote
0answers
3k views

Raspberry Pi RetroPie GPIO Shutdown

I'm trying to make an arcade cabinet with my Raspberry Pi and I want to make a physical shutdown button for it. I can do this with the GPIO, I even wrote a python script to do it: import RPi.GPIO as ...
1
vote
0answers
470 views

Execute shell & python scripts from commands sent via POP

I have my pi set up to text my phone (XXXXXXXX@vtext.com) through a google account when the CPU reaches or exceeds 45 degrees Celsius. I would like to be able to message back to the account and have ...
1
vote
0answers
1k views

Slow frame rate when playing video in Pygame

I've been doing some project on playing the videos and could use the button to change the movies selection. I ended up using pygame but the things are when the video has the resolution more than ...
1
vote
0answers
994 views

how to install cx_oracle python db driver?

I need to install cx_oracle on my pi but I couldn't find arm-specific version or sources. Any ideas how to do it?
1
vote
1answer
548 views

ShiftBrite - running on Python

I was wondering if anyone can help me out with converting the example Shiftbrite Arduino code into Python so I can run it on my RPi. Here is the example code in question: int datapin = 10; // DI int ...
1
vote
1answer
33 views

How to pause Python script until video clip has finished playing

a bit of background info on what I am running: I have a Raspberry Pi which is listening to serial communication from a Wemos D1. When it receives a message it will play the relevant video file. When ...
1
vote
1answer
3k views

Cloning RFID tags with Raspberry Pi 3 and RC522?

I've looked around a lot now and can barely find any information on how to clone RFID tags with the Raspberry Pi, I've seen plenty of content on how to do it using an Arduino but I would really rather ...
1
vote
2answers
939 views

Some Kivy apps not running in Raspberry Pi - Python

Currently, I have a Raspberry Pi 1 Rev2 model B and a Raspberry Pi 3, I'm developing an app that could check dynamic values from several screens, I'm using a 7inch LCD Screen to look the graphics ...
1
vote
1answer
1k views

Python 3.4 opencv import error

I've tried the installation of opencv 3 for Python 3+ on the Raspberry Pi. After importing the opencv using import cv2 on Python shell it gives me this error: ImportError: dynamic module does not ...
1
vote
1answer
571 views

Playing jukebox style MP3 s by GPIO , how does the code/directories work?

Having followed the adafruit "overview playing music with buttons raspberry pi" I thought I knew it all but then I wanted to play random files and then to scroll through the files and play them by ...
1
vote
1answer
381 views

How can i make a GPIO F5 Button

I have a GPIO button triggering an os.system("sudo reboot") command. How can I change the reboot command to send F5 to the active window (web kiosk).
0
votes
0answers
27 views

Play a mp3 file on USB Speakers

I've been trying for several months to play music on my Raspberry Pi 3 or 4 with 0 luck finding a stable player for Python 3. I can get pygame to play until it crashes which is multiple times a day so ...
0
votes
0answers
30 views

Python - run Flask webserver parallel from main code?

For the Raspberry Pi i am developing some home automation tools. At one side i have my main application that reads a CSV file, that consists of date+time entries with a GPIO port nr and a duration. My ...
0
votes
1answer
28 views

Is PiFace Digital 2 compatible with Raspberry Pi Zero W rev 1.1?

Can anybody definitively say if the "PiFace Digital 2" is compatible with the "Raspberry Pi Zero W rev 1.1" or not ? I cannot find any Information on the web - besides a mention in ...
0
votes
1answer
29 views

Performing multiple separate actions in Python with callback to main class instance

I am making a smart nightstand using a Raspberry Pi and Python. It should be able to: Have settings being controlled by a mobile app communicating through TCP requests to the Raspberry Pi Have an ...
0
votes
0answers
16 views

How to display an image full screen on my second monitor (raspberry pi 4)

I am using RPi 4 and running two monitors. I want to display an image on the second screen using Python or Linux command line. I have tried but I couldn't do this with fbi(it displays on the both).
0
votes
0answers
13 views

Pigpio for I2C slave on Pi Zero and the timing of data from the master

I'm using the pigpio library through pigpiod running on a Rpi Zero configured as a slave. The master is an ATMega328PB. On the Pi I am testing using a modified version of the python script provided in ...
0
votes
0answers
33 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
0answers
17 views

What is the display variable for the PiTFT?

I am trying to run my simple GUI on my PiTFT display. import Tkinter as tk root = tk.Tk() root.resizable(height=320,width=240) tk.Label(text="FUZE",font=("Courier", 44)).grid(row=1,column=1) root....
0
votes
0answers
47 views

Installing Realsense On Raspberry Pi 4

Hi I am curious if anyone has seen this issue before? When I try to run realsense-viewer, it outputs "Could not initialize offscreen context!" PS: Followed this https://github.com/IntelRealSense/...
0
votes
0answers
34 views

Selenium and bs4 for Raspberry Pi Webscraping?

I am about to drive myself mad with this problem. After a few days, I have gotten my Raspberry Pi up and running with Selenium using Chromium and its webdriver. It pulls up the webpage and even ...
0
votes
0answers
24 views

Moving /home dir form sd card to USB drive on a Rasspberry pi 4

I'm trying to run Insightface package on raspberry pi 4 after struggling to install all required packages namely cv2 and mxnet but when I exit python or run my program I get “corrupted size vs. ...
0
votes
0answers
21 views

Send signal from php script to python

I am quite new in the raspberry community, but want to use my pi as garage door opener that also creates a slice if humidity outside is lower than inside the garage. Thus, I have written a Python ...
0
votes
0answers
33 views

ST7789 Display on Raspberry PI 3

I just got an ST7789 240x240 display and i can't get it to work with my PI. i'm using this library: https://github.com/DjamesSuhanko/Python_ST7789 i installed all the python dependency's When i ...
0
votes
0answers
14 views

Raspberry pi flagging on_ready() as invalid syntax

I have replaced the async def to @asyncio.coroutine, and await to yield, but my raspberry pi 4 which I'm using to run my discord bot has flagged the on_ready, although it works fine on my computer. ...
0
votes
0answers
41 views

Playing audio on Bluetooth speaker using pygame

I know there are already posts related to this question, but there aren't any I can find that have worked for me. I am attempting to get an iHome B66 Bluetooth speaker to play sound coming from my ...
0
votes
0answers
22 views

How to make cameras take picture simultaneously with a single button?

How can I make my pi's take pictures at the same time whenever I push a button? I've connected GPIO pin 2 to my button and a ground pin to the other end of the button for every pi. This is how I've ...
0
votes
0answers
30 views

Relay is behaving differently from tutorial

Given: Raspberry Pi3 Sunfounder 2 channel relay plugged into 3.3v plugged into ground plugged into pin 18 import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setup(18, GPIO.OUT) GPIO....
0
votes
0answers
27 views

Multiple LED strips over Pi4

I am trying to control 3 LED strips independently over Pi using python. As Pi4 only has 2 PWM channels, 0 and 1, I have only been successful in controlling 2 LED strips. I even tried the software ...
0
votes
0answers
20 views

rpi3b+ pip install psychopy HDF5 not found

I'm trying to install psychopy on Raspberry Pi3b+ with Ubuntu MATE 18.04.04. Here's the error I'm getting while installing pytables. The command I'm using: sudo python3 -m pip install psychopy ...
0
votes
0answers
7 views

dbus and qdbus not working suddenly

I am using dbus and qdbus to control my phone from a pi using Bluetooth to pause play etc. songs and all of a sudden dbus and qdbus dont work anymore All other functions work i can head music from he ...
0
votes
0answers
22 views

Using RPI to control analogue VIDEX intercom system

I'm getting to grips with Python and RPI with the view to replacing one of the VIDEX 3311 intercoms at my workspace with an RPI device to answer the buzzer, see who's at the door (using extant systems)...
0
votes
0answers
33 views

Problem I2C when using BH1750 photoresistor

(Raspberry Pi 2, model B, V1.1 - buster OS - all updated / upgraded - smbus loaded on) Hi, I am quite new to the Raspberry Pi and recently I have hit a brick wall. I am trying to link the Raspberry ...
0
votes
0answers
13 views

Aplay vs CVLC in python

From within python, is there any advantage of using aplay vs cvlc? Both seem to work on my 3+
0
votes
1answer
16 views

RPI4 Camara module v1 - Slow FPS in python script

I'm doing a project that needs a python script to capture and process an image at 3-5 FPS. I'm doing some initial tests and my Camera Module v1 can only capture at 0.85 FPS @ 320 * 240 (also tested at ...
0
votes
0answers
17 views

Threading with GPIO and Push Buttons

I'm trying to loop some code in the main function of the program, while running a thread in the background that's listening for a button press through GPIO. I can see that the thread is running, ...
0
votes
0answers
20 views

Python code block IDE

What is currently the IDE used to edit python with blocks? I found http://www.raspblocks.com/ But it seems to be for edit code online. I want to install the IDE in the Raspi. Thank you.
0
votes
0answers
25 views

PyCharm on Raspberry 4 does not recognize RPI.GPIO

I did develop a Python app for the Raspberry to control stepper motors and read sensor data. My IDE was IDLE on a Raspberry 3. Now I have installed PyCharm Community 2020.1 on a Raspberry 4 (4GB) to ...
0
votes
0answers
24 views

How to make a voting machine using a Rapberry pi?

I'm a newbie on raspberry pi tinkering world, making a small project with R307 fingerprint module this link was quite helpful to get me used to the module later as the writer presents all the ...
0
votes
0answers
34 views

Pi running android OS, is it possible to control GPIO actions?

I feel like I have an interesting question (but maybe not). Obviously the Pi has the GPIO pins that can control servos and sensors. Is it possible to control these with the RPi version of android ...
0
votes
0answers
19 views

Shooting .raw pictures with PiCamera - results in scrambled black and white images

I'm trying to shoot some .raw pictures and I'd like to test both the rgb and the yuv option. What I've obtained so far is a not usable file/image. Meaning that once I open the it with Photoshop, for ...
0
votes
0answers
35 views

Using pigpio and hardware PWM simultaneously

I am using pigpio to read 4 inputs. Everything works fine. And the entire process is a bit long and memory consuming. I also have to use one PWM output. I am planning to use the hardware PWM (pin 12 ...
0
votes
0answers
33 views

How to call readings from one script that reads a sensor to be used by another script that controls servos

I'm trying to use the readings of the accelerometer of an IMU MPU9250 to control servos. For that I created (with help of resources online) a script(IMUmodule) that reads the IMU and spits out ...
0
votes
0answers
189 views

Python threading gives “RuntimeError: can't start new thread”

I have a raspberry pi 3b+. Im running this python code. import time import threading from threading import Thread def wait(): time.sleep(5) while 1: try: Thread(target=wait, name='...
0
votes
0answers
52 views

Installing TA-Lib in Thonny on Raspberry Pi

I am trying to install TA-Lib on my raspberry pi. When I try using Thonny, it gives me a gcc error. I updated the python3-dev and gcc tools but still the same error. When I try to compile using the ...
0
votes
0answers
15 views

Tkinter Problem with Show an Update Value

Well I dont know what i must to use to show the degree of my robot arm for each time where i have pressed a button from my keyboard. More specific the code is fine in terminal, because when i run the ...
0
votes
0answers
27 views

How do I transfer keystrokes between computers?

So, I have a python script on my pi 0w that takes in input from a wii remote and types a specific key, I was wondering if there was any way to duplicate the keystroke to my computer, or some way to ...
0
votes
1answer
27 views

Platypush: where is the SRC folder?

Trying to get a thermal camera working on my raspberry pi 4. Have installed platypush. Following these instructions and next command is "cd PLATYPUSH_SRC_DIR" But where is the SRC directory? I can't ...

1
5 6
7
8 9
14