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
1answer
30 views

Python script unable to receive input from Java

I am quite aware that this might be more of a Java/Python problem but it's on the RasPi and I also don't know if Java or Python is the problem. So here is the situation: I have a python script ...
0
votes
0answers
22 views

PYTQ on Rasberry Pi and Friture

I'm trying to create a stand alone audio analyser using Friture (http://friture.org). I have a B+ (Rasbian version 9, Python 3 and 2.7. Latest updates. Trying to install via pip gives me a PYQT find ...
1
vote
1answer
35 views

I tried many GSM modules with RPI 3B+ but no response

I used both of adafruit fona gsm module and sim900 chip but when i want to see the response by sending AT, i got nothing even though i am sure of my connection is right. I have heard i cant use ...
-2
votes
0answers
45 views

Raspberry Python No Longer Reliable For Continuous Use

I have developed multiple YouTube Raspberry PI clock projects since 2014 and all of them require iterative loops checking for the time (seconds) to change to update a digital, binary or roman numeral ...
0
votes
0answers
17 views

Python3 Error while accessing from a Particular path

I'm Getting the following errors while using python3 from a fixed location, here it is 'python' Directory (/home/pi/python) pi@rituraj:~/python $ python3 Python 3.4.2 (default, Feb 10 2019, 17:23:02) ...
0
votes
0answers
14 views

trying to rotate 28BYJ48 and 2 NEMA17 stepper motors simultaneously but the rpi reboots each time

I am trying to control a 28BYJ48 stepper(Driver ULN2003AN) and 2 stepper motors NEMA17(A4998). I wrote the code using python using PIGPIO but the rpi turns off every time I try to run the code. I ...
0
votes
1answer
33 views

Use ADC with add_event_detect to detect voltage rising

I need to find a solution for my project. Basically I just need to define if there is a voltage or not by using GPIO event detection. For my basic scheme I used 3.3v pin and one of the GPIO pin for ...
0
votes
0answers
33 views

Si7021 temperature & humidity reader — Python code errors

I'm new at this. I bought an Si7021 temperature and humidity sensor, and it's wired to a breadboard -- I believe correctly. I have code, here, from the book "Make: Jumpstarting the Raspberry Pi Zero ...
0
votes
0answers
45 views

Configuratión mcp 3208 en raspberry pi 3 with spi

I have a problem in the configuration of the A / D converter I am working with the Pi 3B +, in case the problem is that I do not know if the configuration is ok, since it only throws a zero value ...
0
votes
0answers
36 views

Connect Raspberry Pi to Wifi using mobile app

I have programmed Raspberry pi to execute program which primarily works using Internet at the boot up. But it works as long as Pi is in my wifi range. Now suppose, my friend wants to use that pi in ...
0
votes
0answers
34 views

piscope SPI pin activity even though the SPI device is not connected

my final goal is to use python (spidev) to communicate with a BMS chip. Until now I was quite unsuccessful, thats why I wanted to use piscope to track the activity of the SPI pins. The device is not ...
2
votes
1answer
62 views

Why am I getting bash: esptool.py: command not found on new Raspbian install after installing esptool.py

I am having major difficulty in installing MicroPython onto an ESP3 using my RPi3B+ (may ask about this elsewhere) but for now I am trying to achieve this on a new fresh install/distro of Raspbian. ...
1
vote
1answer
77 views

No module named '_tkinter' on python3 in Raspbian

I have installed tkinter on my Raspberry Pi that is running Raspbian. It is installed for both python2 and python3. However while importing it in python3, it shows me an error: >>> import ...
0
votes
1answer
39 views

Transfer files from computer to raspberry pi using python script (Wifi connection - SSH setup)

I want to transfer text files or a complete folder containing text files from my computer to raspberry pi using a python script. I am accessing my raspberry from the same computer (Using Putty) from ...
0
votes
0answers
30 views

GPIO number vs Pin number. Which to use?

I am writing a code for an ultrasonic distance sensor. The code worked fine when i used the gpio numbering system for the wires connecting to the gpios and sensor. As soon as i connected the sensor to ...
1
vote
2answers
138 views

Reliable way to play sound (ogg, mp3) in Python, on Pi Zero W

I have been trying to find a reliable method to play sound on my Pi Zero W, in Python. By default, Zero does not have audio output, but I have set up an I2S amp and speaker, following this guide: http:...
0
votes
1answer
29 views

PiCamera not Working - not enough resources

I suspected the problem is that another process is hooking to my camera and thus giving me this error. Does anybody have any idea how i can close the other processes? I've tried rebooting, changing my ...
0
votes
0answers
28 views

Raspberry Pi Camera to load face recognition trained model located in desktop

I'm setting up a security application to have real-time face recognition on Rasp Pi Camera. The face dataset are gathered using laptop and the trained model are also located in laptop directory. Is ...
0
votes
0answers
59 views

Tensorflow object detection script is being killed by system

I'm trying to run an object detection script using Tensorflow. After running the python script it's being killed or freezes. I can see camera's light is being turned on right before the script stops. ...
0
votes
1answer
28 views

How to display a tkinter window while using a push hardware button to capture images?

I have a project in which involves capturing of images. I have to display a UI while capturing an image if a button is pressed. This is the code. def create_window(self): t = tk.Toplevel(self) ...
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 ...
0
votes
1answer
30 views

SenseHat joystick loop consumes 100% cpu load

After messing around with the SenseHAT for the Raspberry Pi (a Model 3B in my case) and testing the LEDs and sensors, I wanted to try out the included joystick as well. Naively going after the "...
1
vote
1answer
85 views

Runtime Warning: This channel is already in use

I am writing a code for Ultrasonic distance sensor. I have wired all the things perfectly and written the code for it but somehow it gives a runtime error of the channel already being in use. Below is ...
0
votes
0answers
24 views

Arm relay for 20 sec and play a video

i am trying to put together some code i have found. i am noob with python. So i want to press a button and 1)arm relay for 20 sec 2)play a video at same time, and to stop both after 20 sec. in those ...
2
votes
2answers
40 views

How can I implement event detection?

I want to implement a function that does not abort my program but wait until I press the button on channel 11. And start the program again. #!/usr/bin/env python import RPi.GPIO as GPIO import time ...
0
votes
0answers
69 views

How can I recieve data from uhf rfid reader's usb port to my raspberrypi controller

I am new to raspberry pi, currently we want to develop gate control with open/close boom-barrier so we are using an UHF RFID reader and a raspberry pi. I bought a RFID reader that has a USB connector ...
0
votes
0answers
25 views

Cannot start Deluge, Keep getting Syntax Error

pi@raspberrypi:~ $ sudo deluged pi@raspberrypi:~ $ [ERROR ] 22:51:31 main:248 invalid syntax (__init__.py, line 1) Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/deluge/...
0
votes
1answer
83 views

Sequential file name problem (Python/Picam)

I would be very grateful for some guidance on the following script. You will see that I have very little experience (3 days!). Using the pantilthat servo control, I am taking a image (jpg) at ...
0
votes
0answers
30 views

How to play specific video files through python script based on passed integer

I have an oddly specific problem, though aren't they all? I have a RPi 3B+ on stretch that I'm trying to boot into a python script that I've written that receives an integer and passes it to two ...
0
votes
1answer
36 views

Mute PAM8302 amp with Raspberry Pi

I'm using a PAM8302 amplifier with a Raspberry Pi Zero W and it's working great. However, I'd like to start the amp muted and then unmute it from a Python script. Per documentation, PAM8302 goes into ...
0
votes
0answers
31 views

Serial communication between RPi and PIC uC uart receiver accuracy

I am currently working on serial communication between RPi and PIC. I am new to Raspberry Pi and python world.... okay following is my code: from serial import * from time import * import RPi.GPIO as ...
0
votes
1answer
20 views

Printing Python Variables for Debugging

I'm a Python newb so please bear with me if I'm asking a stupid question. I have a RPi3 running Jessie lite. I have Apache and PHP installed. I also have netatalk installed and have mounted my pi e....
0
votes
0answers
45 views

Raspberry Pi 3 Linphone Calling

So I am working on a project where I have to be able to make sip calls to a raspberry pi 3 and have it automatically answer any incoming calls. I have been reading this guide: https://wiki.linphone....
-1
votes
1answer
46 views

Unable to run python script on boot

I wrote a script for object detection and if I establish ssh connection to Raspberry Pi and run it from console, everything works fine. As I would like to start the script automatically on boot, I ...
0
votes
0answers
33 views

How to toggle a push button to capture an image and insert a string in a text widget?

I have a project that involves capturing an image using a push button and after I use image processing I can convert it into a string. How do I make the string display the tkinter text widget while ...
1
vote
1answer
67 views

Feh in startup script only displaying images on reboot, not startup?

I have a Python script running on a Raspberry Pi Zero W that calls the image program feh in order to loop through some directories and display the enclosed images. The script is supposed to run on ...
0
votes
1answer
31 views

Removing autostart program from .bashrc

Hello guys I made a really dumb mistake by adding a python script in .bashrc. I wanted to make this script autostart and followed a tutorial, where it said i should add it to .bashrc. Later on i read ...
0
votes
1answer
53 views

two PIRs problem

i am building a security system which consists of two PIRs (GPIO 17 & 18) relay GPIO 24 , video will be emailed and will receive a text message when motion is detected . the camera can see both ...
0
votes
0answers
47 views

Multiple raspberry pi's 3 synchronized image navigation

We have 7 raspberry pi's 3, each connected to the internet and an display. On each screen / raspberry pi is geeqie (image viewer_ running with an image slideshow. The goal is to have all raspberry pi'...
1
vote
0answers
95 views

py532lib - i2c - Working But Too Many Files Open After A While

I'm successfully reading data from my NFC tags with the py532lib, using the i2c connection, put out by Hubcitylabs 5 years ago. https://github.com/HubCityLabs/py532lib/blob/master/py532lib/i2c.py ...
1
vote
0answers
32 views

How to run a graphical program from a restricted user

I have two users. admin can see everything. pi is restricted. I have a tkinter python application. pi must be able to run the program, but it cannot read any of the files directly. There is a data....
0
votes
0answers
33 views

Set variable PATHS_FROM_ECLIPSE_TO_PYTHON debug remote PyDev

I want to write my Python scripts from my Raspberry Pi 3 b+ in my Eclipse IDE (Windows 10) and be able to debug them. I installed Pydev and RSE plugins on Eclipse. I installed Pydev on my Rasp Pi ...
0
votes
1answer
55 views

How to make a simple GUI?

I recently had follow this tutorial which basically is about making your raspberry pi send email notification every three seconds on the location of your device. The thing that is missing now is, I ...
0
votes
1answer
24 views

Python script execution time limits?

I have a python3 script called bot.py which is running a simple (for now) telegram bot, and I can retrieve some PI system states. It's required to maintain the bot online, so I added next string to ...
0
votes
1answer
27 views

Eclipse PyDev remote debugger Raspberry Pi

I have just created a SSH connection between my Raspberry Pi 3 b+ and my computer using WiFi. I have downloaded Eclipse and the PyDev and RSE plugins so I can use Eclipse as IDE for my Python scriptss ...
0
votes
0answers
23 views

Multicast UDP packet transmission in background eventually stops

I have a simple application written in python which sends information via multicast udp in a loop, among other network-unrelated functionalities. This python app is launched from a nodejs script, so ...
-2
votes
1answer
19 views

Ser.write() ,when checked shows only the length

I have used a=ser.write("TEST".encode()) in my code to send data using UART gpio in Rpi. The code shows no error but when I print a,it gives me the length only. Actually i am trying to interface Rpi ...
0
votes
0answers
27 views

Auto-(re)start of GUI application prevents shutdown

I have a GUI program (Python + Qt) coded for my Raspberry Pi. In order to start the program after startup, I have added the following line: @/bin/bash /home/pi/start_my_program.sh into .config/...
0
votes
0answers
21 views

Writing Persian in Python with Raspberry Pi3

How can i write farsi in Python environment correctly? Whenever I want to print a Persian or Arabic word, words are written inappropriately. In the meantime, I've only got this problem in the ...
0
votes
0answers
54 views

Selenium on raspberry - headless firefox not working as expected

i wrote a python code using selenium to interact with a headless browser. I altered the code a little for the use on the raspberry. The code for the PC works fine, but on the raspberry it stops to ...