The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
0answers
15 views

bind event from evdev to GUI wxpython

I have buttons and joystick as in the image below and I am reading events from these inputs on raspbian with the evdev library, I am also running a GUI using wxpython. My question is how can I bind ...
2
votes
2answers
68 views

Rpi3B+ and Audio Amplifier HAT GPIO Pin Push Button False Detection/Triggering Problem

I'm currently having trouble with my project. I'm using a Raspberry Pi 3B+ with an InnoMaker Hifi Amp Hat and some push buttons. import time import signal import os import RPi.GPIO as GPIO GPIO....
-2
votes
0answers
29 views

Refresh Tkinter GUI

I'm using tkinter and trying to make a gui that will display data and refresh, however the master.after function is not working as intended. Wondering if anyone can tell me why. My goal is to have the ...
-1
votes
0answers
19 views

speedtest-cli: download speed 0 Mbit/s

I used a small python script to monitor download speeds at different times. I deactivated it for some weeks and wanted to start again today. Before I run my script I wanted to test if everything is ...
0
votes
0answers
6 views

Pi Camera v2 Capture Photo without warm-up

I want to a project that capture some photos at a time. After taking photos i will send theese pictures to a windows platform to encoding. I saw so many examples about taking photos but i every code ...
-1
votes
1answer
41 views

Stepper motor vibrates, does not turn

I´m working on a simple project for school now and I have to use a stepper motor, but it doesn´t turn. The LEDs go on, the motor gets hot and the motor vibrates. When I adjust the sleep/function, the ...
1
vote
1answer
29 views

PIGPIO problem with delay on scripts

I am trying to run an old Raspberry Pi 2011.12 as a server to control a RGB LED strip. To this I am using PIGPIO since this is the best solution (RPi.GPIO is software based, which creates flickering). ...
1
vote
1answer
46 views

upgrade B+ to python 3.7

I have a B+ running rasp stretch and I am attempting to follow this tutorial to upgrade to 3.7 but I have an issue at the this step: ./configure –prefix=/usr/local/opt/python-3.7.0 make -j 4 Any ...
1
vote
2answers
25 views

How can I install numpy on a headless REMOTE Raspberry Pi Zero?

I need to install numpy on a remote Raspberry Pi Zero. I know how to do it on a local machine, but my Zero has already been deployed as a surveillance camera running MotioneyeOS. I can SSH to the Zero ...
3
votes
4answers
239 views

Raspberry Pi run commands on boot

I thought that running commands on raspberry pi on boot was the easiest thing in my project. But it seems that it is complex enough not to work. I've searched a lot on the internet on a simple ...
0
votes
0answers
24 views

Python app scheduler issue on Raspberry pi, i got error like this “python[2132]: WARNING:apscheduler.scheduler:Execution of job”

I an using Raspberry PI zero W and connected 5 sensors to getting reading from sensors. i used services for start the sensors scripts and i installed python apscheduler for time sequence. Sometime ...
0
votes
1answer
22 views

Callback parameters to GPIO.add_event_detect?

I have a button object that when pressed needs to perform something, and for this I'd need to get a property of the button. I'd like it to work like: ... GPIO.add_event_detect(button, GPIO.RISING, ...
0
votes
2answers
30 views

How to run a raspberry pi program without connected to a desktop screen

I want to be able to run a raspberry pi program without being connected to a desktop screen so the whole idea is to make an object tracking robot using raspberry pi and a camera. This should be able ...
0
votes
0answers
51 views

Selenium won't run on my raspberry pi 3 Model B+

Today I recieved my Raspberry pi 3 Model B+. I downloaded NOOBS and installed it on my raspberry pi. However, I cannot run a selenium browser on it. I have tried to install iceweasel but it says that ...
-1
votes
0answers
36 views

Need help with the Python script [duplicate]

Here is the script I am using to capture 5 images with varying 5 shutter speed. I would like to automate this process to repeat after every 5 minutes. How to go about this? Thanks. from picamera ...
-1
votes
1answer
112 views

Piezo sensor to pick up acoustic instrument signal using Rpi and ADC

I want to read analog inputs from piezo sensors like these on Raspberry using python, which ADC do you advise me with 8 or more channels and how to wire and program it to get digital values?
0
votes
0answers
55 views

Can't use microphone with speech recognition

I'm developing a voice assistant program with python and speech recognition. On windows everything is ok and it works. But on linux i got errors.I'm running raspbian buster on pi 4. here is the code ...
2
votes
2answers
141 views

Is there any built in LED connected with GPIO pin?

In Arduino a built in LED is attached with number 13 Digital pin. Is there any LED like Arduino in Raspberry Pi,which I can use to test my code?
0
votes
3answers
71 views

Help need with python script for PiCamera

I am working with the Raspberry Pi camera and need some help regarding the python script. I need to capture a set of 5 images continuously every 5 minutes interval until I want it to stop. This set of ...
0
votes
1answer
51 views

Raspberrypi unable to read 2000 ppm encoder

I am using a DC motor attached with a 2000 ppm incremental encoder. I am using RPI to count the number of ticks, my code works fine but I am not able to calculate all the 2000 ticks. Any help would be ...
0
votes
1answer
51 views

Problem with i2c communication between arduino and raspberrypi

I have connected Rpi with Arduino using i2c communication. Pin Configuration: Rpi ---- Arduino Mega SDA SDA SCL SCL GND GND I also have an encoder attached to Rpi. Encoder `------ Rpi 5V 5V Gnd Gnd ...
0
votes
2answers
47 views

Communicate with GPIO HIGH/LOW between 2 PIs

I have 2 raspberry PIs 1x PI3 and 1x PIZero with camera attached. I want to set up a system to have a output GPIO pin on the PI3 and a input pin on the pizero connect so that when I set the PI3 pin ...
0
votes
0answers
62 views

Random crash after several hours

sorry for the next error) I'm working on a project with my rpi, which just test on a student website if a teacher is absent, or if a lesson is moved. Actually, the rpi crash totally randomly : after 7-...
0
votes
0answers
26 views

How can I release all camera instances of a RPi in Python?

I'm trying to make a camera application with my Raspberry Pi that should launch on RPi startup. The program itself works fine. My problem is I'm getting the error picamera.exc.PiCameraMMALError: ...
1
vote
1answer
51 views

Cannot install pandas on Raspberry Pi

I have been trying to install pandas for a week now. Read pretty much every thread I could find but nothing seems to work. I keep getting a ton of import and dpkg errors every time. Everything is up ...
0
votes
1answer
33 views

Running script after reboot does not work

I have a simple script will runs a loop that reads off temp data in the console from a sensor and then writes it to a file. I would like to make sure that this script starts running right after my pi ...
0
votes
2answers
32 views

Ultrasonic Sensor + omxplayer block CPU

Thanks to the community i create a scrip that check status of 3 ultrasonic sensors and depending on the status omxplayer will play a movie or other. Problem is that after few while and video loops CPU ...
0
votes
1answer
49 views

RPi.GPIO “flush” interrupts

Intro It seems to me that when one adds and event detection, then removes it and the adds it again, something strange happen: 1) an event is removed to the "detection list"; 2) the event happens; 3) ...
1
vote
1answer
88 views

GPIO pin (BCM 12) acts differently on PI3 and PI4

The following code is running on PI3 and is working perfectly fine. I try to provide a short description of what the code does. In this code I first set the BCM 12 as the pin of interest for my sensor ...
0
votes
0answers
27 views

Combining potentiometers to register as buttons

Does anyone know how I could use 2 potentiometers (1 for vertical axis, other for horizontal) and combine them to register as buttons? I want to make a shifter for sim racing and I want to combine 2 ...
0
votes
1answer
25 views

spidev sanity check not working

ArchARM on Raspberry Pi 3, spidev installed from AUR. I'm trying to control a Waveshare device via SPI, and can't get SPI to work from Python. The most basic sanity test I can think of is failing: ...
0
votes
1answer
71 views

RPi4B PCA9685 PWM Controlling Servo Problem

I have this RPi3 that I am running a bunch codes on it. It is communicating with a server and also I have python supervisor running on it. Now I am trying to set up the same system on RPi4. For some ...
-1
votes
1answer
71 views

Response to a incoming call using python script

I am trying to implement a system using Raspberry-pi and SIM-800 modules. Now I can see incoming calls from my python script, but it can not parse data. import serial serialport = serial.Serial("/...
2
votes
1answer
67 views

Moving from Raspberry Pi to another platform?

Lets say that I develop my highly complicated LED diode project on Raspberry Pi 3 B+ in Python. Now I don't want to use my RPi for this project becouse it is expensive and I want to move with next one,...
0
votes
1answer
22 views

Use Raspberry Pi 3 with its camera module to live stream and also store that video on cloud

I have a Raspberry Pi 3 and camera module, I want to use that camera and live stream our internet and also store that video on cloud in chunks of specific time period (like store videos of 1 hour ...
0
votes
1answer
112 views

Can't use my Raspberry Pi 3 B+ for I2C in high speed mode

I've been trying to use a Raspberry Pi 3 B+ to get data from an accelerometer, namely an ADXL 357, via I2C but the problem is that the data rate is about 200 Hz or even less. I tried to set the ...
1
vote
0answers
36 views

Why does writing to I2C is too slow in Python comparing to C? [closed]

I am trying to find out why the same code in Python works 25 times slower than C even if I use CDLL, when I try to write into I2C. Below I will describe all the details what I am doing step by step. ...
0
votes
0answers
24 views

Internet slowing down at specific time in the morning

I am using a RaspberryPi 3B as a server to run a Telegram bot (using node) and I began to notice that after some time the bot takes ages to reply; so I downloaded speedtest-cli and setup a python ...
0
votes
0answers
33 views

Python socket.accept not getting connections?

I run the same Python program on Raspberry and Windows laptop to listen to a blood pressure device over peer2peer UTP cable (no router). import socket s = socket.socket(socket.AF_INET, socket....
1
vote
1answer
56 views

Not able count Pulses Generated by PLC

I am using the below code to capture the pulses and count pulses for a specified interval but the output not as what i expected. For every pulse it is giving uncertain value. The pulse i want to ...
0
votes
0answers
26 views

Oled Display doesn't work properly

Im using my Raspberry Pi zero W For an project with an Oled display and i can't get it to work properly I Installed Adafruit and tried the examples. It didn't work and i tried an other example but ...
1
vote
1answer
23 views

Pandasql on Raspbian?

Has anyone successfully installed the Python pandasql package on their Raspberry Pi? sudo apt-get install pandasql Gives the following results: Reading package lists... Done Building dependency ...
1
vote
1answer
59 views

Nested Else issue. Very Basic

This is the code I am using to operate a relay to open my garage and the garage status is checked by a magnetic switch. However there is an issue with the logic can someone help me please as I am ...
0
votes
0answers
14 views

Rpi become frozen with python loop script after few cycles

It is a bit hard to show and ask to review entire code, so please let me describe it. I am using Rpi as serial-controller with python script but the python script become frozen.(technically I have to ...
1
vote
0answers
20 views

I don't know why suddenly mjpg-streamer and webcam stop working

I have made a program that uses three webcams and three ultrasonic sensors using raspberry pi 3 and python 3. When each ultrasonic sensors detect stuff in front of them, webcam take a picture of it. ...
0
votes
2answers
23 views

Pigpio equivalent of GPIO's event_detected() function?

Is there an pigpio equivalent to GPIO's event_detected() function? I need something that is constantly watching for a button press. The code I currently have doesn't consistently detect it (python ...
0
votes
0answers
195 views

Run program on raspbian buster LXDE startup

I know this question has been asked before, but the methods referenced are not working for me. Currently I have done this: sudo nano /etc/xdg/lxsession/LXDE-pi/autostart and added the line @python3 /...
0
votes
0answers
14 views

Can't read from serial0 using PySerial when python script starts at boot [duplicate]

I have a Python script that uses Pyserial, connects to '/dev/serial0' and reads from it in loop. The script works fine when starting it manually after the RPi is up. However, when I added the script'...
0
votes
0answers
23 views

MQTT and Rapsberry PI

When I connect to a newly installed Mosquitto client from my Windows machine it works fine See the python command below : >>> import paho.mqtt.client as mqtt #import the client1 >>&...
0
votes
2answers
53 views

Configure Raspberry pi to run my application before GUI Desktop

I have created an application through Python that has library dependencies on Qt4, pyqt4, pyqtgraph etc. This application is based on Raspberry Pi, I have developed and finished it on the platform. I ...