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

How to create a person or head (not face) detection using open CV that are not too slow when run in Raspberry Pi 3B+?

Hello guys my problem is creating a program that can detect the head(not face) or human detection for my project One of the program that i see is too slow for raspberry pi 3B+ which is this : https:/...
0
votes
0answers
34 views

Raspberry Pi 3B+ successfully connect and pair but can't receive data from OBD II

Hello guys my problem is i cant recieve any data from OBD II to Raspberry Pi 3B+ Here the materials that i use: Raspberry pi 3B+ ELM327 -> OBD II Operating System of Raspberry Pi -> https://medium....
1
vote
2answers
86 views

python start on boot

i am trying to get my WS2812 NeoPixel python sketch to run at boot, i used a tutorial https://tutorials-raspberrypi.com/connect-control-raspberry-pi-ws2812-rgb-led-strips/ it install the correct files ...
0
votes
0answers
26 views

Unable to stop motor through GPIO in Python

I'm using an rPi to send a GPIO signal to a servo motor. When I run the program, the motor starts turning, and then continues without stopping, even if the program has terminated through the use of a ...
1
vote
1answer
60 views

PCF8591 with Analog Joystick I/O error when reading input PYTHON

I have been trying to create a retropie unit, and I'm in the midst of writing a script to inject uinput events for the analog axis values. This is the code I've written so far, but the issue is that I ...
3
votes
1answer
43 views

Sending a binary data stream to a GPIO at a certain frequency

I would like to send a random binary data sequence to a rpi GPIO at a particular frequency and then read the data stream off a scope. Is there a way of implementing this through python?
1
vote
0answers
125 views

How to connect ST7789 LCD to Raspberry Pi

I'm trying to connect to this LCD ( sry 4 japanese page:( use translate plz ) This monitor driver is ST7789, 7pins.[GND VCC SCL SDA RES DC BLK] And now I'm connecting to pi like this https://imgur....
0
votes
1answer
35 views

Is this a Python quirk or an imperfection in the Raspberry Pi input?

I am running out of ideas to get this Python code working the way I want it to. Please take a look at my code and help me figure out what's wrong, or if it's a hardware issue with the Pi causing my ...
0
votes
0answers
21 views

How to make more efficient reading of GPIO

My (python) program (on Raspberry Pi zero W) turns on/off a GPIO pin (connected to a relay module) depending on the RSSI signal of my phone (connected via bluetooth) and the status of one more GPIO ...
0
votes
1answer
32 views

SimpleMFRC522 stop reading after some time

My code stack after some time (example 1 day) after reading MFRC522 in loop mode. At the beginning it works without problems, after some time is not working anymore. I can't figure out why. Can you ...
0
votes
0answers
11 views

How to record and save an ongoing stream from picamera?

I am currently doing this project of streaming a live video into a localhost and then capturing an image after button click using a picamera. Here is my code: For streaming: import io import ...
0
votes
2answers
57 views

How to run a program after reboot

RASPBERRY PI 4 Hello there, I have this script that should shut off a power outlet when it detects a movement. The rpi-rf_send code is from this repo. The question is: if the current goes away, ...
2
votes
0answers
23 views

Permanent Arduino usb address on RPi!

So my project is using to Arduinos slaves to RPI that is master. They communicate through USB. Each time I remove one of the Arduinos I need to modify the .Py script to add the new USB alocated. Is ...
0
votes
0answers
22 views

Timed trigger for GPIO input

I'm running a raspberry pi system that records fish as they swim passed an IR break beam sensor at a fish ladder. So far the system works well but I'm trying to cut down some of the false triggers. ...
0
votes
0answers
27 views

How do I control a GPIO pin with a HTML button?

I am trying to send a temporary signal through one of the GPIO pins on my Pi 4, like to light up an LED for 1 second then turn off. Is there are way to do this by clicking on a button on my HTML web ...
0
votes
0answers
13 views

Rasperry Pi 4B LXterminal only runs python after python3.8 installed

I installed python 3.8 on raspberry pi 4b, now every time I open LXterminal, python 3.8 starts up, and using ctrl-D to exit only starts python up again. I am in a catch 22!
1
vote
2answers
55 views

AdaFruit ServoKit CircuitPython Blinka Library Installation Problem

I'm follow along with a tutorial to get started with using CircuitPython to control servos on my RaspberryPi (https://learn.adafruit.com/adafruit-16-channel-pwm-servo-hat-for-raspberry-pi/using-the-...
1
vote
0answers
60 views

Raspberry Pi always reboots when trying to shutdown

I've been facing this issue for a long time and I haven't been able to find a working solution for it. I've found a few different posts online of people having the same issue but none of the solutions ...
2
votes
0answers
21 views

PWM on pump not working as expected

I am attempting to run a PWM on a pump using rpi.GPIO using the following code: def run_PWM_on_pump(): gpio.setmode(gpio.BOARD) gpio.setup(8, gpio.OUT) p = gpio.PWM(8, 0.5) #also works at ...
1
vote
0answers
33 views

picamera incorrect buffer length

I am currently using a pi camera module to stream video using flask and at some point, it randomly crashes. I found a similar question over here and they say that clearing the stream helped them sort ...
0
votes
1answer
42 views

433mhz Status sockets project

I've been working on getting a Home automation project going for a while, using a Rasp pi 1b (26 pin header). This is a well trodden path by others, as it is a project to control status remote sockets:...
0
votes
2answers
65 views

I2C MPU9250 Gyro/Accelero/Magneto 9-DOF Sensor MicroPython Programming Problem

so I've recently set up my raspberry pi. Am following a tutorial for the MPU9250, from https://github.com/tuupola/micropython-mpu9250. I have did a install of the micropython-mpu9250, and tried the ...
0
votes
1answer
19 views

pigpio.error: 'no permission to update GPIO' Only on some pins

I am having an issue where I get this error 'no permission to update GPIO'. whenever I try to address certain gpio pins. I looked at other posts that had similar issues but they seemed to have either ...
3
votes
1answer
97 views

How to get curent cpu mhz on a raspberry pi with python?

I need a sample program that will put the current CPU MHz in a variable with python. I prefer a short compact program. Thanks in advance.
1
vote
2answers
64 views

Unable to Install NumPy on Raspberry Pi 3

I'm installing NumPy on a Raspberry Pi 3 using pip. When I type in pip install numpy into the SSH bash terminal, pip starts collecting and downloading NumPy. But when it runs the setup.py file, it ...
2
votes
0answers
23 views

Adafruit OLED (128x64) display very dimmed?

I bought the Adafruit 128x64 OLED Bonnet and tested it with the demo program. Unfortunately the luminosity is very low and it is not satisfying: I have tried to adjust the contrast from 0 to 255 but ...
1
vote
0answers
26 views

Setting application screen display layer

I am displaying a video onscreen with omxplayer using '--l 0' Is it possible to run a python program and set it's screen layer to > 0 Expanded info :- I am running omxplayer from within a python ...
2
votes
2answers
149 views

How to connect ST7789 LCD to SPI Bus 1 as 2nd screen?

I've been trying to get this ST7789 library working with the 240x240 1.3" display on the rpi0w Python lib https://github.com/solinnovay/Python_ST7789 So far I've set all the screen pins to the bcm ...
2
votes
2answers
67 views

LIRC could not connect to socket

After installing on Raspberry lirc-0.10.1 according to this instruction (Setup IR Remote Control Using LIRC for the Raspberry PI (RPi)), when you try to send data from any config file, the irsend -d /...
1
vote
1answer
21 views

Installing netcdf4 on raspberry 3b+

I am trying to install NetCDF4 on Rp 3B+. This is the command I used: sudo pip3 install netcdf4 But the error message is: Collecting netcdf4 Using cached https://files.pythonhosted.org/packages/...
0
votes
0answers
20 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
1answer
84 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....
0
votes
0answers
12 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
50 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
44 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
57 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
34 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
351 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
27 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 ...
1
vote
2answers
58 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
32 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 ...
1
vote
1answer
182 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
1answer
151 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
75 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
159 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
84 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
66 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
62 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
53 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
67 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-...