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

Chat Application in Raspberry Pi

I'm a beginner to Raspberry Pi. I have a Raspberry Pi 3. Is there a tutorial on creating a chatroom application hosted on my Raspberry Pi, preferably with Python?
0
votes
1answer
57 views

How clean RAM in raspberry pi

Good afternoon, I'm from Argentina, I hope you can help me solve a problem in Raspberry Pi 3B with Python 3. I have little experience in the subject, and I have made a program for home automation that ...
2
votes
1answer
20 views

apt-get python error ImportError No module named io

I can no longer install or remove any software using apt-get. When I try I get the error: Could not find platform independent libraries <prefix> Consider setting $PYTHONHOME to <prefix>[:...
-4
votes
0answers
22 views

How to connect raspberry pi 3 to Google cloud platform [on hold]

I want to send images from my raspberry pi to the google cloud platform. Any help please
0
votes
0answers
17 views

Python program crashed on RPI compute. syslog contains message “INFO: task python3:724 blocked for more than 120 seconds.”

I am working on a project with a PI compute module set up on a custom PCB. The project has to reliably run ideally indefinitely while logging sensor data and writing video and audio to a usb when the ...
-1
votes
1answer
38 views

How do I create a list in Python with the given distances from my Ultrasonic distance sensor? [on hold]

import RPi.GPIO as GPIO from time import sleep, time # constants DEBUG = False # debug mode? SETTLE_TIME = 2 # seconds to let the sensor settle CALIBRATIONS = 5 # number of calibration ...
1
vote
0answers
11 views

PICamera white balance difference between preview and capture

Below is a screen shot of the preview and the captured image of the same scene taken from a single PICamera at the same time. As you can see the one on the left (the capture) is noticeably bluer than ...
2
votes
0answers
26 views

efficiency of python sleep function to set a raspi pin HIGH and pause the script

I am continuously measuring some parameters using Raspberry Pi. I am using Python. When the measured value is higher than a particular value, I want to set a GPIO pin high (for some LED indicator) and ...
0
votes
0answers
15 views

RPlidar could not be launch

I am now doing a project using RPLidar in ubuntu 16.04. However, I am facing some problem with running the RPLidar. I have checked that my userid is inside the dialout group. The below code is what I ...
1
vote
1answer
53 views

Reading Temp/Pressure with a single Raspberry Pi

I would like to be able to read values of two thermal couples and a pressure gauge using my raspberry pi. Recording the data and then sending it to a server at the end of the day. I am using dual t/...
0
votes
0answers
17 views

How to install Numpy in Anaconda on Raspberry Pi 3B with Raspbian Stretch OS?

My goal is to use Numpy inside of Anaconda on the Raspberry Pi 3B. I downloaded Anaconda by following the instructions: https://stackoverflow.com/questions/49170125/cannot-install-anaconda-in-...
1
vote
1answer
19 views

how to implement a video stream unto a webpage using a Raspberry Pi and being able to see the terminal without connecting HDMI cables

i am quite conversant with Raspberry Pi and python language which i love very much that i was looking at videos on Youtube about Raspberry pi and i came cross this video which got me really intrigued ...
0
votes
0answers
16 views

How to prevent the automatic execution of script in IDLE?

I have a python script which I can work on with nano and start without problems via SSH. Opening the with IDLE in the GUI on the raspberry opens a terminal prompt and the script is executed after a ...
0
votes
1answer
20 views

Get the default raspberry pi internet disconnection event

I'm working on a python script running on a script, which would upload some files to the server. Probably, this needs internet connectivity to be turned on. I'm seeing a log pi@raspberrypi dhcpd[5] ...
1
vote
1answer
27 views

RPI project Minecraft Server

me and a project partner are running a Minecraft server off of a RPI and connecting via its wireless feature. we wanted to create a python script which would control an LED and toggle it on/off based ...
1
vote
2answers
21 views

Permission denied using Serial

I'm using some XBee to build a mesh network and everything is working, BUT only if I run the code using sudo. Now that the code is "Finished" i want to remove this need, because i know that it isn't ...
0
votes
0answers
17 views

Read data from RPLidar and getting “Wrong body size”

I'm trying to read response from a Slamtech RPLidar connected to my Raspberry PI 3 via USB and I'm getting the following error: Traceback (most recent call last): File "app.py", line 70, in main ...
0
votes
0answers
30 views

Segmentation Fault when running script with Python3

I have an application which should running on Python3 with Kivy and Postgresql. I had my Python3 installed according to the guide from this blog below: Install Python3 but I realize the Python 3.7 ...
-2
votes
0answers
41 views

Run a Python programm by button click?

usually on a Raspberry PI I run Python programs through cmd. I would like to know if there is a easier way, for example click on a icon on the desktop?
0
votes
2answers
37 views

Select default Python as 3.7.2

I had installed Python 3.7 which according to tutorial in this blog(i change the Python version to 3.7.2): https://bohdan-danishevsky.blogspot.com/2017/01/building-python-360-on-raspberry-pi-3.html ...
1
vote
1answer
27 views

How Can I Determine Why My Python Script Is Terminating?

I'm running Raspbian Jessie 4.9.35-v7+ on a Pi 3 Model B. I cobbled together a basic python script to monitor a GPIO pin and send a network signal to a remote application and made two copies of the ...
0
votes
1answer
26 views

How to send data from raspberry pi to AVR over bluetooth?

I am searching for a way to send data from raspberry pi to my AVR using HM10 or HC05, both of which are available. What I need to do is to read values from a .txt file and send it from the raspberry ...
1
vote
4answers
71 views

program my robot with python

initially my question was about how to fix my code. You informed me that usage of that python class will not work with my setup of one motor. I agree and I want to instead use the GPIO library to ...
-1
votes
0answers
20 views

Automatic starting script [duplicate]

Can I create a script in Python 3 that will automatically start when powering up my Raspberry Pi zero v1.3 (no wifi and no GUI - use of Raspbian lite)? If so, can you help me a bit further with the ...
0
votes
0answers
26 views

How to run a servo motor if a particular condition is satisfied

I have a script of python which is about object detection once a particular class is identified the servo motor should work Iam using object detection using tensorflow and opencv , basically scripts ...
0
votes
2answers
104 views

Runtime error A PWM object already exists for this GPIO channel

iam new to raspberry pi and i got an error while a running servo motor in my object detection script i need to run the servo whenever my if condition is true so the same pin run multiple times if ...
0
votes
1answer
30 views

How do I use the send_message method on a Raspberry Pi 3?

When I run this code: import datetime import smtplib import re import email from email.mime.text import MIMEText import email.message from robobrowser import RoboBrowser from bs4 import BeautifulSoup ...
2
votes
3answers
76 views

Multiple GPIO Buttons

I've seen a tutorial here that shows me how to do this: But what I want to do is like this: I want to have multiple buttons and distinguish between them. The graphic I painted depicts the desired ...
0
votes
2answers
44 views

Need help clarifying my python script to run on Rpi3b+

If it's not obvious, I'm trying to learn python, and am having a go at it. Although, I'm running into some issues. Any help would be appreciated. I'm trying to run this on a Rpi3b+ & with a ...
0
votes
1answer
23 views

Xbee-API python

I'm trying to use my Raspberry Pi B+ as a gateway so others sensors, also with xbee, can send data and get a few kind of commands by it. The problem is that i can only read the data with the simplest ...
1
vote
1answer
66 views

Why is PIR motion Sensor always on?

I'm trying to make an alarm system but the motion sensor is always on as soon as the script is run. I've posted a question about a different problem i was having with this project so it'll confusing ...
1
vote
0answers
23 views

Mouse Control Function in Python for Raspbian

Does anyone tried to control mouse cursor position and click in Python application for Raspbian before? I am refering to this website: https://pyautogui.readthedocs.io/en/latest/mouse.html#mouse-...
1
vote
1answer
45 views

How to toggle button on and off with gpiozero?

I can't seem to find a solution of doing this using gpiozero. I've done it using rpi.gpio with add_event_detect and call back to change state but I was under the impression gpiozero is much simpler. ...
3
votes
1answer
35 views

gpiozero import resets pullup

In order to use a GPIO connected button as a power off switch I have set a pullup for pin 23 in a dtb overlay (following http://blog.gegg.us/2017/01/setting-up-a-gpio-button-keyboard-on-a-raspberry-pi/...
1
vote
0answers
11 views

Can I use the hostname of my Smart Plug in my Python script throughout different WiFis?

I have a Python script which retrieves the measured data from a smart plug so that I can visualize it on my Rasbperry Pi. This command gets the data send_hs_command("192.168.1.26", 9999, b'{"emeter":...
0
votes
0answers
13 views

How can get raspberry pi live camera feed for my laptop opencv program [closed]

I want to access raspberry pi camera using my laptop opencv program. So Is there any way to access it ?
0
votes
0answers
17 views

How to program 433 remote using raspberry [closed]

I buy four remote controls and I want to use them in my home automation. Every remote has same code for same button and i need to change that (it is possible). This is the code that i use to get ...
2
votes
0answers
37 views

Control on-board led triggers from python

I know the trigger for on-board leds can be controlled from the command-line (or a script) I have a python program that I want to temporarily take over the system led blink it a little and return ...
0
votes
2answers
34 views

Can I setup something on my raspberry pi so that a prgram I have is always running?

I have tried adding it to the rc.local file but sometimes the program will launch on boot but won't stay open. Is there a way to have so when the program stops running that it gets relaunched?
1
vote
0answers
14 views

Running mongodb as as service increases boot time by 30 seconds

Title says it all. I have an RPi 3 with Raspbian that has a web app running at start up in chromium. It took 20-30 seconds from powering on to the app appearing before I added mongo, and after I ...
0
votes
0answers
25 views

VLC for python/Pi Jukebox [closed]

after finding out that the vlc Player is available for python I want to try to create a simple jukebox with it. My basis is this site: https://linuxconfig.org/how-to-play-audio-with-vlc-in-python If ...
1
vote
0answers
28 views

Threading on Raspberry pi Serial Port

I have multiple Raspberry Pi(RPis) using which I have to send data (wireless,using Long Range modules connected to TX RX of RPi) on just one Rpi. All the RPis(Ones sending data) use different ...
1
vote
1answer
37 views

PyGame for Jukebox without display

I want to great a small (local) jukebox without a display. Songs are stored on the SD card and every button is more or less hardwired to one song (always to the song called "1.mp3" on the sd card ...
1
vote
0answers
39 views

Error opening USB Cam with OpenCV4: GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed

After installing OpenCV4.0 on my RPi, i tried a simple script below with a Logitech USB Cam (720p) but at "cam = cv2.VideoCapture(0)" it gives me an error "(python:num process): GStreamer-CRITICAL **: ...
0
votes
0answers
11 views

Is it possible to read android tag via RFID-RC522

So, I googled for two days and didn't get correct answer. Is it possible to read NDEF data from Android phone via RFID-RC522? I've tried to use couple of libs to solve this issue. Also I've tried to ...
2
votes
1answer
38 views

Got compilation error when installing plyvel

I got an error while trying to install plyvel on my raspberry (pi 3 B+) with sudo pip install plyvel : Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting plyvel ...
1
vote
0answers
40 views

Getting Error: ImportError: No module named 'cv2' in Geany python editor

I'd finally installed OpenCV 4.1.0-dev in my raspberry pi with success, I checked that in Terminal by : pi@raspberrypi:~ $ python3 Python 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]...
2
votes
0answers
34 views

Detecting “No Mouse Movement” in python on Raspberry Pi

So this is going to be a bit confusing but using a basic loop i can detect keyboard and mouse inputs using the following: globals()['keyboardEvent'] = evdev.InputDevice('/dev/input/event0') globals()...
1
vote
0answers
20 views

How to set access rights for lighttpd using python scripts (cgi) which uses temporary files

My problem is: I have a running lighttpd web server. The files are stored in \var\www, also a python script, which can be executed to get an image from the raspi camera. Every time the script is ...
0
votes
0answers
31 views

Which language is best for Raspberry Pi Apps for better GUI and Firebase

I want to develop Raspberry Pi app which requires lots of REST API calling, GPIO controls and very best GUI. I have done research on following. Running C#.net or VB.NET apps in Raspbian OS using Mono....