Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
19 views

Play a sound with python

I am trying to play a sound at a certain altitude with my raspberry pi. I would use import winsound but I have no idea what I would use if it was on the pi. Would it remain the same?
0
votes
0answers
14 views

2 way Socket communication over bluetooth using python

Is there any way to make communication with 2 RBI over bluetooth using python Socket? Do you have some tips how can i do it? Should i use multithreading? Right now i'm using this lib -> https://...
0
votes
1answer
51 views

Running a Python script as a service file on boot [on hold]

I have a Python script (that works) set up and I want to run it automatically every time the Raspberry Pi is on. I have read that I need to create a unit file and I have done so, but whenever I try ...
0
votes
2answers
45 views

Camera with speed sensor on raspberry pi?

im useing raspberry pi 3 with ultrasonic sensor and normal usb camera . so i will connect the raspberry pi to AZURE IOT HUB so ive setted the ultrasonic sensor in a place so if any car pass that place ...
0
votes
0answers
12 views

RPi camera OCR,and save output in variable (pyhton with tesseract)

I want to make a python code for the raspberry pi, with the tesseract OCR engine, that it keeps reading text from the camera in realtime, saves in a variable, and sends output to Arduino. Is there a ...
-3
votes
0answers
16 views

phython program to display the data received over raspberry pi over monitor [on hold]

I'm working on project, I want to display the input data which is image, text msg, video. Input data is send using an Android app over IP address of raspberry pi3. I want a program for data receiving ...
-1
votes
0answers
22 views

Python Error code (TypeError: __init__() got an unexpected keyword argument 'vf')

Here is the full code can you please fix the error for me # USAGE # python detect_faces_video.py --prototxt deploy.prototxt.txt --model res10_300x300_ssd_iter_140000.caffemodel # import the ...
0
votes
1answer
27 views

problem when running the python application in /etc/rc.local in console mode

I'm coding an application to run when starting raspberry, however when trying to run this error is returned: QXcbConnection: Could not connect to display My application is done in python with qt ...
0
votes
1answer
27 views

Use Python flask or NodeJS for controlling stepper motors via Web?

Im planing a project where I need to controll some stepper motors with my RaspberryPI. I'd like to controll those motors interactively via a web GUI. This server should run on my Py. Now I found a ...
0
votes
0answers
8 views

specifying baud rate when using PyBluez Bluetooth library

I'm trying to establish Bluetooth connection for a hc-05 Bluetooth module. When using the "serial library" to setup the connections, you can specify the baud rate using "serial.Serial("*******", baud ...
0
votes
0answers
6 views

python - add overload __add__ to imported DotNet function

Let's say e.g. I have a dotnet module MyDotNet, containing a class 'Numbers'. The class Numbers has a function NumbersAdd to add two numbers. I use the dotnet module by use clr, with AddReference. ...
0
votes
0answers
20 views

How to access Tx Rx of UART to TTL converter on RPi 3B?

I accessed the hardware by connecting it to GPIO pins (TX-RX) and wrote a code that that could send instructions to that hardware and receive outputs from it successfully. The first few lines of code ...
0
votes
1answer
29 views

How to copy file to USB Mounted on Pi from SSH Server

I am writing a python script that checks the files in a folder on my Android, and will copy .jpg files to a USB I have mounted on my RPi. (My Android is running as an SSH server). I am able to ...
1
vote
1answer
54 views

Ultrasonic sensor stops working a few minutes later

I want to get distance continuously using while loop but a few minutes later my code suddenly stops working and doesn't get distance (there is None value in distance variable) I have changed first ...
0
votes
1answer
24 views

PyQt5 not found by Python3.7

I installed Python 3.7 on my raspberry pi with the help of Installing Python 3.7.0 on Raspbian tutorial and wanted to use it to start my script which uses PyQt5 but its throwing a ModuleNotFoundError. ...
0
votes
0answers
12 views

How to code using python, displaying the total number of page of a document [closed]

How to code using python to display the total number of page in a docx and display it in a text box?
0
votes
0answers
12 views

Installing Qiskit on Raspberry Pi 3 B+

I’m trying to install qiskit on my raspberry pi 3+ and I’m getting the following error: “Could not find a version that satisfies the requirement qiskit (from versions: ) No matching distribution ...
0
votes
2answers
82 views

What is the fastest way to send commands to Raspberry Pi over ethernet?

I'm working on a IoT project. The idea is basically: I have a notebook running a Python program that get frames from an IP camera, process it, and based on the result change a Raspberry Pi GPIO pin ...
1
vote
0answers
16 views

Interrupts with MCP23017 using the mcp23017 dtoverlay

I'm at my wits end with this one. Okay, so we've got an MCP23017 with its INTA wired to the Pi gpio12 (bcm) in /boot/config.txt dtoverlay=mcp23017,addr=0x20,gpiopin=12 so far so good. I'm looking ...
-1
votes
2answers
35 views

Control motors and servos simultaneously (Python)

I have a Raspberry Pi 2B+ and some knowledge of Python. I need to control a DC motor, two servos and a LED simultaneously. The requirements are: Must control two servos, a LED and at least 1 DC ...
0
votes
0answers
9 views

Not receiving any data via Bluetooth connection

I'm trying to send data from a ps3 controller to my Raspberry Pi, but the code I'm using does not pick up any data sent from the controller. The controller is connected yet nothing happens when I ...
3
votes
1answer
45 views

Alternatives to Matlab - Running Matlab code in Raspberry Pi [duplicate]

I have to run some Matlab scripts on Raspberry Pi. As per my understanding, Matlab is quite heavy and cannot be installed on Raspberry Pi. Are there any other safe alternatives? My Matlab code does ...
0
votes
0answers
10 views

Windows IoT Core Python Compatibility

Does Microsoft still support Python on the Windows IoT Core because most of Microsoft's resource no longer detail how to create python applications for the IoT Core? If Python is still supported, how ...
1
vote
1answer
40 views

Turn off onboard LEDs at boot

I know very little about Raspberry Pi and Python. I've been able to turn off the LEDs in the terminal using the following command: sudo su - echo none > /sys/class/leds/led0/trigger However, I ...
0
votes
0answers
4 views

x.overrideredirect not working on raspberry pi

On my pi, I was trying to make a simple clock in tkinter (which works.) But, I can't use overrideredirect. The whole program works fine on windows. Any help is greatly appreciated!
0
votes
0answers
6 views

Using Cakephp running python tensorflow

The program is work in Raspberry Pi using Rasbian Stretch. I have python script with TensorFlow object detection. Now I am using CakePHP to implement the website. In the CakePHP, I want to run the ...
0
votes
0answers
35 views

Raspberry Pi IR camera light sensor access

I am trying to use the light sensors on the the raspberry pi IR camera as a light sensor to determine if light is exposed or not. Is there a python picamera command that could access these light ...
0
votes
0answers
10 views

Invalid MIT-MAGIC-COOKIE-1 keyQXcbConnection: Could not connect to display localhost:10.0

I have RPi 3 B+ and 5" HDMI touch screen. I wrote this little GUI application in Python: import sys import os from PyQt5 import QtWidgets class Test(QtWidgets.QDialog): def __init__(self): ...
0
votes
1answer
27 views

Camera feed sent through TCP socket gets stuck sometimes

I am getting the camera feed from a camera on a Raspberry PI to the computer using a TCP socket to use it for openCV. It works well with minimal delay. However, sometimes the frame gets stuck(freeze) ...
0
votes
1answer
28 views

Error executing ifdown and ifup command

I'm running a python script to configure the wifi interface, but I'm having a problem with the ifdown and ifup command. It looks like this command has been replaced by: sudo ip link set wlan0 down ...
0
votes
0answers
23 views

Pi Camera choppy video/skipped frames

I'm using the Pi camera to record 30 seconds of footage, triggered by an IR break beam sensor. This is running on a Pi 3 B+. I've soldered in all the wiring using an Adafruit Perma-Proto Pi Hat. My ...
0
votes
2answers
39 views

Adding Averages to my Data Logger

I am using this Python program to log data from a serial device, and want to add a second document that logs hourly averages of the data. Anyone have an idea on how to add hourly averages? #!/usr/bin/...
0
votes
0answers
41 views

LCD Display with I2C gives garbage when called by interrupt

I have problems with a 2x16 LCD Display controlled via I2C. I use python 2.7 and have a Raspberry Pi Zero W. When called from the main loop everything works fine and I can access the display with ...
0
votes
0answers
49 views

module RFID-RC522 MySQL, Python

I have the following problem. I am working with Python and RaspberryPi 3 recently. My task is to write the data (RFID together with date and time into the MySQL database). Date and time works, they ...
0
votes
1answer
38 views

“Python Games” prompt has disappeared from menu

I am what I would call an old hand with computers but totally new to the Raspberry Pi. I am using it to try to learn Python and for this purpose I have copied out a program from "Raspberry Pi for ...
1
vote
1answer
35 views

can import numpy, matplotlib modules in shell, but not from terminal

I am running python3.5 on a RPi3 and have installed matplotlib and numpy. I can import when in the shell, but not from within the terminal, per below: Python 3.5.3 (default, Sep 27 2018, 17:25:39) [...
0
votes
1answer
16 views

Capture keypress from Minecraft Pi in Python

I've been playing around with the Minecraft Python API and I'd like to run some of my code in response to a keypress within the game. I'm able to selectively run code based on player position or block ...
0
votes
0answers
23 views

Erratic motor behavior from a Pi being controlled through a websocket

I'm in the process of trying to put together a small "robot" that can be controlled over the internet. I'm trying to get the code for the drive motor controls down now, and I've hit an odd issue. ...
0
votes
0answers
18 views

Sync RGB strip lights with MIDI clock pulse input

I would like to create a lightshow of sorts, for my Keyboard, that can output a midi clock. I have a strip of WS2801 and I am looking for a way to sync colour changes/fades/flashes etc to the beat of ...
0
votes
1answer
14 views

Call chromium within a python script in crontab

I'm doing a digital signage project for an marketing agency that i work for. I have a Python Script that when called manually in Shell does everything, log and then opens chromium. But when It starts ...
1
vote
1answer
22 views

Raspbian Stretch install imapclient to Python 3.5.3

Why I need it: I've run into an issue where I first wrote a python script using imapclient to check my gmail using Python 2.7. Then continuing the path to full automation I made another script which ...
0
votes
0answers
21 views

Help in Python Addon Development

I'm working on a simple slideshow addon for kodi, import xbmcaddon import xbmcgui import time xbmc.executebuiltin('ShowPicture("special://home/addons/script.cosmos.slide/fanart.jpg")') time.sleep(...
0
votes
0answers
38 views

Read data from a balance via RS232 port using rs232 to usb converter cable in rapsberry pi

I am a beginner to this, I have a balance (scale) that I need to read the data (weights of material) from. Data will be read every 10 seconds and I have looked up RS232 codes in here and utilised ...
2
votes
1answer
112 views

how to increase fps for raspberry pi for object detection

I'm having low fps for real-time object detection on my raspberry pi I trained the yolo-darkflow object detection on my own data set using my laptop running windows 10. When I tested the model for ...
0
votes
1answer
27 views

What command do I use as an “and” function? [closed]

I want to imply a condition to the inputs I am using. Example: if_button_b.was_displayed #and target number = 5 then display.show("win") Basically, what I want to do is: #if button b is ...
0
votes
0answers
45 views

How to connect different sensors in Raspberry Pi 2 model B?

I want to connect Temperature,Moisture and Humidity sensors in Raspberry pi at a time and I have to collect data continuously one after the other.And I don't know how to connect please help me... I ...
2
votes
1answer
51 views

Installing libraries via pip is taking forever. Raspberry pi 3b+

I tried to install scipy using pip3 install scipy as well as sudo pip3 install scipy and it got stuck at Building wheel for scipy for 45 minutes. Same is the case for cython. What is the fix or it ...
0
votes
2answers
49 views

Analyzing video from pi on PC via python

So I am interested in using my raspi as a robot and I want to try to get a video stream from a camera attached to the raspi. I found a tutorial on how to get the video streamed over LAN using python ...
0
votes
0answers
21 views

Cannot connect to GSM 900A Module

I am working on a project that uses SMS to push data to a blockchain. I bought a GSM 900A Module and connected it to Raspberry Pi 3b+. The connections are as shown in this picture : https://i.stack....
0
votes
2answers
26 views

i2cdetect detects device - Pi can't access / find it

Currently I'm working with a gyro-sensor and need to use i2c in order to use it. Using a Pi 3 B (os:NOOBS) on kernel: Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/...