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
-1 votes
1 answer
27 views

ENOSPC error, but camera is working

I'm using a home security system which seems to be working well, but when I type python alarm.py in terminal, I get this error: pi@raspberrypi:~ $ python alarm.py mmal: mmal_vc_port_enable: failed to ...
user avatar
  • 1
0 votes
0 answers
35 views

ADXL345 shows non-zero acceleration value when idle

I am using an ADXL345 accelerometer connected to a Raspberry Pi 3B+.I have written a python code to check the acceleration value. However, the accelerometer always shows a non-zero value for the x and ...
user avatar
-1 votes
1 answer
88 views

Using I2C with MMC34160PJ magnetometer

I'm trying to read data from the MMC34160PJ magnetometer using the Raspberry Pi 4. However, I'm pretty stuck as to how I can do it as there's seemingly no example code or library for it. I have been ...
user avatar
-2 votes
1 answer
109 views

Python RPI.GIO RaspBerry Pi 4B with UNIPI installed on on it GPIO pins to digital output and relays not working

We have raspberry Pi 4B with a UNiPI setup, of note the complete setup was not done by us but another client but we got the list back which ports where being set on wich on the UniPi. We have ...
user avatar
0 votes
0 answers
45 views

Connecting two Raspberry Pis two capture synchronized images

I have two Raspberry Pi 4s and I want to connect them together so I can capture synchronized images; one from each pi. At the moment, I have one pi capturing an image after I press a button that is ...
user avatar
2 votes
1 answer
731 views

Fullscreen GUI App on Raspbian startup

i'm working on a Simple DIY Home Control project Language is Python, and GUI is PyQT5 The project is just some ESPs connected to a main Raspberry Pi (3B+) controller The problem is that I'm trying to ...
user avatar
0 votes
0 answers
43 views

Raspberry PI 4 SQL Database receiving old data

Im having a strange issue. I have always connected to a DB at the start, then querried as needed. However for some reason if I have my database connection outside my loop I am not reading in the ...
user avatar
0 votes
0 answers
51 views

Why can't the camera module take as high res pictures as raspistill?

I'm trying to make the pi camera take pictures through a python script. I know it's capable of 3280x2464 pixel images, because there's a jpg taken by raspistill of that size on the pi desktop. However,...
user avatar
0 votes
1 answer
188 views

How to enable SPI and access RFID RC522 Chip on Alpine Linux

I've set up Alpine on a Raspberry Pi 3B in diskless mode and it runs exceptionally smooth. I've managed to address GPIO pins (e.g. to read from temperature sensors) without much effort. Now I'm trying ...
user avatar
-1 votes
1 answer
36 views

Import Module error

i'm trying to test webcam detection with Yolov3 but when i try to convert the yello.weights to Keras with convert.py i have this error: imed@imed-S551LB:~/Bureau/keras-yolo3-master$ pip3 ...
user avatar
1 vote
1 answer
37 views

I2C Interfacing with HIH6130

I'm trying to read data from sparkfun's HIH6130 Breakout for measuring humidity and temp data. Following this instructable (though without the i2c shield for the pi), the provided python code just ...
user avatar
0 votes
0 answers
39 views

Can't run MetaSploit commands on Raspberry Pi received via LoRa radio/SPI

Relevant Code: https://github.com/MichaelBonnet/TeamZephyr/tree/main/radio, rfm9x-base.py and rfm9x-payload.py Situation: I am using LoRa radio modules as a communication link between two Raspberry ...
user avatar
0 votes
1 answer
142 views

ValueError: numpy.ndarray size changed, may indicate binary incompatibility

I installed v4l2py with pip3. I'm using Bullseye. At execution time, v4l2py issued the error message (see title). Some DuckDuckGo research told me that recent changes in C bindings in numpy 1.20 ...
user avatar
0 votes
0 answers
26 views

How to connect a wireless barcode scanner in raspberry pi?

I would like to know how the wireless scanner connect to raspberry pi, I am a college student and I am creating inventory system for my project and I am using a visual studio for the inventory system. ...
user avatar
0 votes
1 answer
142 views

llvm version 11 and librosa error

Best regards i need to download librosa to raspberry pi so first of all i downloaded virtualenv and created environment and installed llvm with: sudo apt-get install llvm pip3 install llvmlite==0.37 ...
user avatar
  • 1
0 votes
1 answer
34 views

Raspberry PI 3 mariaDB and python issue with expanding columns

I am having an issue that I don't really have programming experience to resolve. I have an application that deploys an SQL table that may have more or less columns depending on user input. I am ...
user avatar
0 votes
0 answers
44 views

Issue With Windows Remote Desktop & Launching Python Application XRDP

Hey guys I am using XRDP with remote desktop. I am having no issues connecting or using the cmd prompt among other things. However I am working on a pyqt5 python application. When I launch it from the ...
user avatar
0 votes
0 answers
14 views

Read from analog sensor through spi from ProcessPoolExecutor

I'm working on a project in which i need to record sensor (current sensor) readings every second, and store these records into JSON file, Also make some calculation on a bunch of data that has been ...
user avatar
0 votes
1 answer
120 views

USB GPS dongle doesn't return consecutive GSP traces

I used this USB GPS dongle to retrieve GPS traces of user's trip. Device configuration is successful. pi@raspberrypi:~ $ cgps -s ┌───────────────────────────────────────────┐┌──────────────────Seen 17/...
user avatar
  • 141
0 votes
0 answers
67 views

control Grove - RGB LED Ring/stick

Does someone have an idea how to control Grove - RGB LED Ring (20 - WS2813 Mini) or Grove - RGB LED Stick (10 - WS2813 Mini) with Raspberry Pi 4, GrovePi and Python?
user avatar
0 votes
1 answer
59 views

Viewing the captured content of the webcam live

How can I view the captured content of my webcam on Linux/Raspberry? I dont want to share it, only view the content live on my monitor. On windows Logitech has an official program where I can preview ...
user avatar
  • 1
1 vote
1 answer
3k views

Camera only working with deprecated legacy option

I have a camera module connected to my Pi 3B+. I have downloaded the very latest raspberry Pi OS (called bullseye) which does not support the old. legacy camera stack. You don't even have to enable ...
user avatar
  • 123
0 votes
0 answers
59 views

Input Number and output a number of pulses

I own a mobile home park. I have water meters that have remote displays. I find myself constantly needing to change the values of the display. It takes forever to roll the wheel by hand, so I want to ...
user avatar
0 votes
1 answer
181 views

Raspberry Pi, how can i turn bluetooth on and off over Python script?

i want to play either a sound, which is saved on my raspberry pi as a MP3 file or send a song from my phone over bluetooth to my Pi. So i found out, that if i run a song over bluetooth and play one ...
user avatar
0 votes
0 answers
25 views

Regular webcam vs Camera Module V2?

I have Raspberry v2. I would like to enlarge the screen of a Liquid-crystal display, like this: The camera would stay in a fix position recording the screen and display it on a monitor bigger. It ...
user avatar
  • 1
1 vote
0 answers
29 views

why won't my raspberry pi python program run at boot up? [duplicate]

i have recently bought a raspberry pi 4 module b to be able to run programs 24/7. but sometimes my power/electricity can go out at which then makes the program stop working. i tested my program in the ...
user avatar
0 votes
0 answers
42 views

DFRobot_RGB1602 library does not work properly with DFRobot DFR0554 and Raspberry Pi Pico

Problem summary: set_cursor(0,0) brings text to (2,1) and set_cursor(0,1) brings text to (3,1), texts goes to imaginary 3rd line before 2nd line as if a 20x4 display. I modified the Python code to ...
user avatar
1 vote
1 answer
806 views

How can I open a connection to my Raspberry Pi over Bluetooth without having to pair?

I'm extremely new to Raspberry Pi and Bluetooth in general and have been having some trouble and confusion connecting between my computer and Pi programmatically. I'm trying to open a Bluetooth ...
user avatar
  • 113
1 vote
3 answers
91 views

Constant 3V3 to GPIO output behavior

I am new to circuit design, and I have some questions about a circuit I'm seeing in a raspberry pi starter kit. I think my questions is elementary, but I am having trouble finding an answer due to my ...
user avatar
0 votes
2 answers
142 views

Keeping a Python script for PWM running and just changing duty cycle

I am currently trying to connect a laser to my 3D printer and give a TTL signal manipulated by an M106 command. The "official" way didn't work out for me so right now I am trying to control ...
user avatar
0 votes
1 answer
64 views

Micro Switch code implementation

I'm working on a production counter that would count the material as it would hit the switch and that would be counted as 1. The issue I am having is that the code I wrote is not doing anything when I ...
user avatar
0 votes
0 answers
29 views

Can i Transfer Data from one raspberry pi to another over i2c? [duplicate]

Hi, i have following Problem: I have A raspberry Pi 3B+ with a Touchscreen, which uses every Single Pin on the 40Pin GPIO header. The only thing i have is a i2c breakout on my Touchscreen. But i have ...
user avatar
0 votes
2 answers
93 views

How can i set up my owm serial communication between two Raspberrys?

i have following Problem: I have A raspberry Pi 3B+ with a Touchscreen, which uses every Single Pin on the 40Pin GPIO header. The only thing i have is a i2c breakout on my Touchscreen. But i have the ...
user avatar
2 votes
1 answer
240 views

BlueZ receive Bluetooth sensor information

Good afternoon, First of all I apologize for asking questions in this thread but this is my first time writing on StackExchange. I am doing a university work where it is necessary through a Raspberry ...
user avatar
  • 21
0 votes
0 answers
337 views

AC current measurement with ACS712 and Python

I'm currently trying to program my ACS712 5a current sensor to my Raspberry Pi. At the moment I have hooked up my current sensor via ADC (ADS1115) to the Raspberry Pi 4. ADC seems to read the ...
user avatar
0 votes
0 answers
68 views

Scapy python module isn't working and other solutions won't work on raspberry pi

when I run anyu python using scapy fully updated it does this: Traceback (most recent call last): File "/home/pi/pentest/NetScan/netscan.py", line 36, in <module> from scapy.all ...
user avatar
0 votes
1 answer
34 views

How to handle different 'input events' in a Raspberry pi with python

I have a program for detecting motion in raspberry zero but I need to also have the capability to react when a button is pressed. But I can't. Can someone give me lights what should I do? The thing is ...
user avatar
1 vote
0 answers
117 views

MCP23008 Python Input Handler

How do I declare a Python callback handler method on a MCP23008 input pin? This Adafruit tutorial, which uses CircuitPython shows how to read input from the extended GPIO pin on the MCP23008, but does ...
user avatar
  • 111
-1 votes
1 answer
267 views

Micro Switch implementation in Raspberry pi

I am a beginner using a raspberry pi 1 model A+ to create a production counter that would count the material as it would hit the switch and that would be counted as 1. The issue I am having is that I ...
user avatar
1 vote
1 answer
80 views

Raspberry Pi HQ camera exposure time jumps at 1 second

I am trying to build a timelapsing program in python, which analyzes the picture and determins the exposure, based on which it corrects it's shutter speed using a polynomial regression. But I got ...
user avatar
0 votes
1 answer
52 views

Permissions issue using hard drive [closed]

I am new to using raspberry pi. I've wrote a script in python that takes images and stores them in a connected hard drive, in a directory that is created by the script. When trying to open the files ...
user avatar
  • 9
0 votes
2 answers
65 views

Any way to get sudo privleges without opening a command line in raspian? [closed]

Right now to get python scripts to run with user privleges in thonny with typing in this command from the command line: sudo thonny I can't close the command window without it closing thonny also Is ...
user avatar
0 votes
1 answer
439 views

Adafruit ADS1x15 library - I2C Bus error even though I2C is enabled

I am developing a program for a client using the Adafruit ADS1x15 library to use an ADS1115 module on the Raspberry Pi. This is the relevant part of the code where the error is occurring: import RPi....
user avatar
  • 133
0 votes
1 answer
281 views

Import problem with ADS1115 on rpi

Im currently trying to set up an ADC (ADS1115) and trying to test it so everything works. Ive used a code from github (link provided at the end) and watched several youtube videos about how to set it ...
user avatar
0 votes
1 answer
158 views

Raspberry Pi Python Script stops after some hours [closed]

i've read that it is a common issue, that some python scripts stops after about 3 hours. i have the same problem with mine. it is a script, that ligths up a LED strip like a fire. Unfortunately i'm ...
user avatar
0 votes
0 answers
138 views

Using python socket with raspberrypi.local as ip

I have a raspberrypi zero 1.3 and am connecting to it by enabling local ssh as instructed here and using raspberrypi.local as the ip to connect with using putty and winscp. I would like to connect to ...
user avatar
0 votes
0 answers
61 views

How to setup GPIO on a Flask production server?

I am coding a web application with Flask and I come across with a problem where I cannot setup my gpios on my public production server. It throw an error 500 Internal server error. I've realized ...
user avatar
1 vote
0 answers
66 views

Brushless Motor not spinning when controlling with PWM and ESC

I'm currently working on a drone which is controlled by a Raspberry Pi. I try to controll the motors by using PWM on the connected ESCs, which is described in many guides and forums. For that I use ...
user avatar
0 votes
1 answer
46 views

Mqtt driven python servers not working when launched by crontab -e / @reboot

I have programmed in Python several mqtt driven servers on a Raspberry Pi W (with Buster) to execute a set of commands when receiving a given set of mqtt messages from the mqtt broker (after ...
user avatar
  • 11
1 vote
0 answers
21 views

How to combine ssmtp with License Plate Recognition on Python and Sudo Nano

I need help with combining ssmtp on both python and Sudo nano for my Raspberry Pi 4 Model B, as I have setup the ssmtp for Raspberry Pi with the codes below: sudo apt-get install ssmtp sudo nano /etc/...
user avatar

1 2
3
4 5
62