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-3]

Use this tag when referring to the Python 3 language. This can include discussions about specific features unique to the language or perhaps when referring to software that requires Python 3 in order to function. Note that general programming questions are often better suited to Stack Overflow; use this tag only where directly relevant to the Pi.

0
votes
1answer
15 views

Camera with speed sensor on raspberry pi?

I'm new into coding but I'm making a project where a camera should take a picture if the Raspberry pi gets a certain value from a sensor. For example, if I have a speed sensor and camera connected to ...
0
votes
0answers
14 views

Raspberrypi 3b+ interface with Voice recognition module V3.1

I have write program for Voice recognition Module V3.1 and Raspberrypi 3b+ , but my problem is I am not able to write any of my voice command on voice module when I speech my command its not return ...
0
votes
1answer
21 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
25 views

Sending Data from LoRa connected to Raspberry Pi

My objective is to connect a LoRa module with RPi and send data using it. So I made the connection:(Rpi to LoRa) 3v3 (Physical Pin 1) to Power Source (Pin 1) Tx (Physical Pin 8) to Rx (Pin 3) Rx (...
0
votes
0answers
27 views

Should motion detection use images or still frames?

Some Context For a project I'm working on, I'm creating a security camera that detects motion. When the camera has detected motion, it checks again to see if that motion was caused by a human. This ...
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
30 views

Python Bluetooth connection automatically

Is there any way to connect Bluetooth device automatically without manually entering the passkey and automatically trusting the device?
0
votes
0answers
52 views

Connecting a new Bluetooth device without monitor?

We are trying to connect a Bluetooth device without a passkey and trusting default yes in Python. I am running a headless Raspberry PI 3, and I want it to automatically accept pairings from any ...
-3
votes
0answers
17 views

Retry after exception [closed]

Am trying to create a loop using try and exception.when an exception occurred. I want to retry again and again. import time import serial import string import pynmea2 from time import sleep import ...
2
votes
1answer
34 views

Installation of opencv-contrib-python through pip3 fails

I typed the code pi@raspberrypi:~ $ pip3 install opencv-contrib-python it responded with "Collecting opencv-contrib-python" Could not find a version that satisfies the requirement opencv-contrib-...
0
votes
0answers
12 views

Separately python audio output and osmc output

So I'm doing a project .I am using raspberry pi 3 as a media player using osmc and is connected to my projector. I have written a python file so that it uses voice recognition (pocket Sphinx) to use ...
0
votes
1answer
35 views

Getting my Raspberry Pi Camera working after a certain altitude [closed]

I was having trouble making this code, I am using the MPL3115A2 sensor. I want my raspberry pi camera to start recording for a while after a it passes a certain altitude. I am using python so would I ...
0
votes
2answers
47 views

How to add power button to RPI 3 b+?

I want to make mini computer and I want add button for on/off power button. I will change config.txt with dtoverlay=gpio-shutdown. And then add button between GND and GPIO5. There has written that it ...
0
votes
2answers
106 views

cron not executing python3

I am running Raspbian Stretch and have a python 3 script that executes correctly when I am in the relevant directory and input it in the command line as: sudo python3 Example.py The shebang #! line ...
1
vote
1answer
35 views

Use matplotlib on Raspbberrypi

Using The following Code for saving plot locally on raspberry: from numpy import genfromtxt import matplotlib.pyplot as plt import plotly.io as pio y = range(10) x = range(10) plt.title("Adc data") ...
0
votes
0answers
30 views

ADC PCF8591 reading integrated sensors values

I have this ADC board: https://www.amazon.com/ACROBOTIC-Digital-Converter-Breakout-Raspberry/dp/B06XY7572V That has integrated thermistor and photoresistor Board connected to l2c: Pi SDA -> ...
0
votes
1answer
44 views

Failed building wheel for cffi on Model 3B+

The OS running on the Pi is Raspbian 9.8, I'm trying to do the sudo pip install --pre azure So I can send images from my Pi to my blob storage on azure but when I run the above command it begins ...
0
votes
0answers
24 views

How to manage with background scheduled tasks

I have a python program running on RP3 B+. Raspberry has a NRF24L01, TSL2561 and YF S201 water flow sensor. Program flow should be as follows: in main loop raspberry always should listen NRF channel ...
1
vote
0answers
24 views

PiCamera python : buff/cache memory keeps increasing

I need to take a picture in each second in an infinite loop. I've wrote 2 different python scripts: one with camera.capture() and another with camera.capture_continuous() In both cases, I see the ...
2
votes
1answer
50 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
0answers
61 views

interfacing sen0189 turbidity sensor with raspberry pi 3 via mcp3008?

I am working withe the turbidity sensor SEN0189 and I am using mcp3008 A to D converter but I am not able to get the values for it, as I am not able to download the adafruit mcp3008 libraries in my ...
0
votes
2answers
39 views

Piezo Beeper sound output is too low

I need to use some kind of indicator for errors and warnings, I thought a piezo beeper would be perfect since I have one lying around, I did some research online and found out that I can connect it ...
0
votes
3answers
68 views

Crontab suddenly doesn't start jobs

I'm suddenly having crontab issues, I didn't do anything other than change the script names and then change them in crontab as well so they all natch, the scripts work if I start them manually, so i'm ...
0
votes
0answers
18 views

Python keyboard package not responding through VNC

I have a simple python program that responds to keyboard presses using the package keyboard: import keyboard import time def catch_key( event ): print( "Key pressed:" + event.name ) def propel()...
0
votes
1answer
33 views

Import Error: No module named watson_developer_cloud

I'm trying to create a program that will send an image to the IBM Watson studio and use that to perform a computer vision image recognition analysis. Anyways, when I try to run the program, it only ...
0
votes
1answer
30 views

I need a lightweight CLI Linux Distro that can support Python

I have a spare raspberry pi, I figured i'd use it for a python releated task, is there a cut down Linux Distro that does not include a GUI but only a CLI that can also fully support running python ...
0
votes
1answer
53 views

Servo robot with keyboard control

I am currently creating a design project that involves controlling several servo motors for a raspberry pi 3. I want to use a keyboard to control the direction of the motors, and I am using curses to ...
0
votes
0answers
21 views

webserver to use if web app have both internet and non-internet dependent tasks

I was working on an application where i have two tasks and which are interdependent Fetch some data from external server. Even if the internet gets disconnected can the same webpage call my flask ...
0
votes
1answer
27 views

Generating signals with Pi

I have a vector of 500 numbers and would like to output these at a sample rate of 1kHz, thus a signal time of 0.5seconds. Is there any way to do this using a Pi? Do the GPIO pins only allow for an On/...
0
votes
0answers
41 views

Raspberry Pi shows 100% CPU usage then crashes when I run a python script

Hi I've been working an opencv and python project which the raspi should detect and recognize a face and detect a motion. It works fine with my laptop but after I run it on my raspi the raspi crashes. ...
0
votes
1answer
60 views

Multithreading Python Raspberry Pi 3 B+

My Raspberry Pi 3 b+ is reading by Modbus the values of an irradiation sensor, processing all the data, showing it in a plot and showing some warnings (if the irradiation ramp is higher than 5%). I ...
1
vote
1answer
54 views

Access wpa_supplicant inside docker

How can I access wpa_cli inside a docker? I want to connect to wifi from inside a docker in Pi 3. For that I am using wpa_cli. But when I run wpa_cli inside the docker I get following error: Could ...
0
votes
1answer
25 views

Serial read from arduino not working properly

I am trying to read analog read from ardunio connected to my raspberry pi. Following are my raspberry pi and arduino codes. Raspbery pi: import time import serial ser = serial.Serial('/dev/ttyACM0'...
1
vote
1answer
50 views

Accessing a Virtual Environment from IDLE3 shell?

On my pi3 I have created a virtual environment with Python3. I run my pi headless, using my Windows 10 PC. I access the pi with 3 apps: - PuTTY for terminal usage; - WinSCP for a file Explorer; and ...
0
votes
1answer
39 views

Python program issue run at bootup, just work one time [closed]

I have some problem on Rpi3. I work for kiosk program. I created python script. If rpi connect to internet, chrome shows page from internet but if there is not internet connection on pi, chrome shows ...
0
votes
0answers
13 views

gpiozero ImportError in virtual environment

I've been trying to use the gpiozero library lately with one of my opencv projects. Installed gpiozero using pip. Sample code works fine, no issues. The problem is, my opencv installation is in a ...
0
votes
0answers
132 views

SSLError while trying to install pip for python3.4 on Raspbian-Stretch (Armv7l)

The issue is that I have a tensorflow .whl targeted towards python3.4 but by default on raspbian-stretch python3.5 is installed so I installed python3.4 python3.4-dev using apt-get. After that i ...
-1
votes
1answer
35 views

Python program runs with 'python3 progfile.py' but fail to start as service

I installed a python program from a github repo with an automatic script. It is configured to launch itself as a service on startup, and everything seems working fine. I edited the 'py' file to change ...
0
votes
0answers
34 views

Pygame initalisation for TFT on /dev/fb1 only succeeds as root

I connected a 320x240 TFT to my Raspberry Pi A+ running Raspbian stretch via SPI and set it up as fbtft_device. It shows up in /dev/fb1 and I can write images to it via pygame. I initialize it like ...
0
votes
0answers
72 views

How can I install/use smptlib in Python 3.x with Thonny

I have got this response. I have no idea how to avoid it: Traceback (most recent call last): File "/home/pi/Franz/email3.py", line 2, in <module> import smtplib File "/usr/lib/python3/...
0
votes
0answers
61 views

MQTT connection to broker

Hello I would like to configure paho mqtt but I am having trouble to get it to work properly. I am trying to connect my raspberry to external server where broker is up and running. Port and IP are ...
1
vote
1answer
37 views

JSON not working with LIRC

I have the following script which is meant to write/read a json file. The problem is it will only write/read the file from the command line and not when using a remote via LIRC. import RPi.GPIO as ...
0
votes
1answer
85 views

prevent script running twice consecutively - Python

I have the following two Python scripts one sends a motor forward while the other script sends it backwards. Each script is operated by it's own button on a remote. Script A import RPi.GPIO as GPIO ...
0
votes
0answers
22 views

Gpiozero inside custom function

So I have a odd problem. I have raspberry pi model 3 using gpiozero in python 3. Just trying to turn on the motor at half speed when calling the function. Issue is that nothing happens when ...
0
votes
2answers
70 views

How to make a button toggle a led?

I have some code which turns an led on when I hold the button. But only when I am pressing it. Could somebody help me so when I press the button then the light stays on and if I press it again the led ...
0
votes
1answer
24 views

Need help blinking a led continuously?

I'm new to Python and just go this Raspberry Pi, and need help blinking this led. I have got it to where the LED will blink once( Turn on for a second, then turn off). I need some help so when I hit ...
0
votes
0answers
80 views

Not able to install the latest version of Scipy(1.2.0) on Raspbian

I have Scipy version 0.18.2 on my RaspberryPi 3. However, I need the find_peaks() function which is only available on higher versions. I followed this link to install scipy. But the python3 setup.py ...
2
votes
1answer
67 views

read variable and trigger event - python

I have the following script which increases the counter variable every time a button is pressed. When counter reaches a certain number i.e. 10 lets say I want an event to trigger. from time import ...
0
votes
0answers
230 views

Installing gstreamer on raspian

I am trying to compile gstreamer 1.14.4 to take advantage of the webrtc module. I was able to successfully compile it using cerbero on my raspberry pi but I have an issue where when testing my webrtc ...
1
vote
1answer
83 views

Running a Python Script with Tensorflow via systemd doesn't work, but running the same script via the terminal works

I have successfully coded a Python 3 Script that detects objects in a frame given my the camera. Based on those objects detected, I run commands and logic. I have tested this and I can run it via the ...