Stack Exchange Network

Stack Exchange network consists of 174 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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

listen for sensor continuously when using django as a server

I have developed a smart bulb using relay to switch the bulb on and off when I clap. This works with a simple python script but that i want to use django as a server for handling this use case. I ...
0
votes
0answers
6 views

Is full FOV in rpi-cam V2 possible at 640x480 @60fps?

I have a video recording system developed using RPi 2 Model B and Cam v1 and plan upgrading to RPi 3 Model B and Cam v2. My application is such that I need higher frame-rates (60fps +) at Full FoV, ...
0
votes
1answer
22 views

small sound sensor not detected

The usecase of my project is when I hear the sound of clap then only the relay channel should get triggered. But in my case, the GPIO.input(SOUND_INPUT_PIN) is only giving me value 1(HIGH). The ...
0
votes
0answers
23 views

Control RC Car via Raspberry Pi and Python and PCA9685

I want to control an RC car using my raspberry pi with a PCA9685 PWM driver and a BDESC-S10E-RTR motor driver. I can make the car go forwards and stop however I can't make it go backwards. Here is my ...
0
votes
1answer
25 views

Help in understanding how to use Raspberry Pi's “official” 7 in. LCD from Python script

Let's say I have a Python script that receives an IR signal and lights up an LED. We'll call it a "hit" indicator. In the IR transmission, let's say a person's name was embedded in the signal. How ...
0
votes
0answers
13 views

downloading google sheet as csv using python script on raspberry pi

Tried the script from this tutorial. I was able to successfully do his other tutorial on listing(printing) files in google drive by a python script but not this one. So I think I'm getting ...
0
votes
1answer
17 views

error trying to set up RFIDIOT on raspberry

I am new to raspberry and python in general. I followed different guides to set up RFIDIOT (even the documentation and the installation guide on the repository on Github). So far, when I run pcsc_scan ...
0
votes
0answers
31 views

python code if else statment [closed]

i am using if else statement and for some reason if keeps missing the first to lines. i do have the correct modules imported and it is setup correctly it's just the if else part that is getting me ...
-2
votes
0answers
8 views

Cannot install ephem on fresh raspbian lite (raspberry pi zero)

pi@raspberrypi:~/REST_RF $ sudo pip install ephem Collecting ephem Using cached https://files.pythonhosted.org/packages/c3/2c/9e1a815add6c222a0d4bf7c644e095471a934a39bc90c201f9550a8f7f14/ephem-3.7.6....
1
vote
2answers
26 views

How did I launch this Python script at boot?

I have a Python script running at boot, on a Raspberry Pi, and of course I didn't write down how I set it up. Now I need to change it, and I can't for the life of me figure out how it's getting ...
0
votes
2answers
26 views

How to properly implement threading within a function toggled by a button [on hold]

I need a little help if possible. I'm trying to make a threaded function which will make my LEDs blink randomly as long as the button is pushed. when it is released it should exit the function and ...
1
vote
1answer
24 views

GPIO Pins Stay Active

On my Raspberry Pi B+ I have a standard program to blink a LED. I run it using the terminal command python blinky.py, and when I do, the LED lights up, but does not blink, as it should. I then cancel ...
2
votes
3answers
269 views

Reinstalling Python3

I purged all the python3 packages and when I try to install python3 again on my raspbian I get this: Setting up python3.5-minimal (3.5.3-1) ... # Empty sitecustomize.py to avoid a dangling symlink ...
-1
votes
1answer
29 views

Python script not accepting import function

I've been writing a simple python script, and I import the GPIO library, and the time library. I have the following code. print()'Importing GPIO library' import RPi.GPIO as GPIO print()"Importing ...
0
votes
1answer
26 views

Unable to SSH after modifying /etc/rc.local

I am attempting to have a program load on boot and have successfully achieved my desired function by modifying the /etc/rc.local file and adding the following line - (sleep 15; python /home/pi/...
0
votes
0answers
12 views

DISPLAY Error with using Raspberry Pi camera module with Python and Opencv

I encounter an error and this does not happen every time. When I run sobel edge detection right after reboot, it works. camera = PiCamera() camera.resolution = (640, 480) camera.framerate = 32 ...
0
votes
1answer
17 views

Service won't run python srcipt with privileges RASPBIAN JEESIE

I have script in python that need to be run with "sudo" keyword. Everything because I'm accessing "/dev/mem". Now I need to start this python script on RPi startup. So I create simple service that ...
0
votes
0answers
27 views

Dry contact with Python [closed]

Continue from this post: Log / monitor gate (dry contact) with Raspberry PI GPIO What would the python code look like if pin 18 was the input with a 10KO external resister attached? How would you ...
0
votes
2answers
44 views

Python pigpio 'no permission to update GPIO'

I am trying to run the following code on my Raspberry: import pigpio import fileinput pi = pigpio.pi() ### Define constants pwm_range = 255 pwm_clock_div = 8 left_motor_dir_pin = 35 ...
0
votes
1answer
47 views

VNC: how to manage a fleet of RPi?

I've to manage 50 Raspberry Pis remotely, e.g. via VNC over the web. The RPis are behind a router, so I can't access them by IP. I'm looking for something like a self-hosted TeamViewer. The desired ...
1
vote
2answers
48 views

Raspberry Pi DC Motor Not Working

So, I am attempting to control a DC motor using a RPi Model 2B. I am using a l293d motor driver to try to control the motor and a 4 AA battery holder. The diagram is supposed to look like this ...
1
vote
1answer
65 views

SPI only returning zeros with Raspbian (It works with IoT core)

I am using this ADC connected to the channel 0 of my Pi3 board for reading values from a sensor. In IoT core, I was using a very simple code for testing the my device, and it worked fine. The C# code ...
0
votes
0answers
20 views

ERROR while running port.write('AT+CNMI=2,1,0,0,0'+'\r\n')

I am trying to connect my Raspberry Pi 3 with GSM SIM 900A. I followed the this Link to do the task. I was not getting anything in the begning, then i changed this line port = serial.Serial("/dev/...
0
votes
0answers
20 views

How to create installer files in Raspberry pi

I have created a program in Raspberry pi and I am running it using the command python myprogram.py . Is it possible to create the installer file of this program? that means after installing this ...
0
votes
0answers
12 views

RFM69 Radio Transceiver: Arduino is not registering acknowledgement for transmission sent by Raspberry Pi

I am building a system in which an Arduino Uno with an RFM69 radio chip transmits data to a Raspberry Pi running a script in Python. I am using the RFM69 library for both scripts: Arduino: https:/...
0
votes
0answers
30 views

How to make a Twitter bot that can copy tweets from a list and tweet as its own? [closed]

I wanna make a automated twitter bot that can copy tweets from a twitter list and tweet as my own tweets, mostly news and stuff. Is this possible with a Raspberry Pi B+ (internet using WiFi dongle)? ...
0
votes
0answers
24 views

WHY my Python BLE device discover codes don't catch as many devices as Raspberry Pi OS panel does?

I developed some BLE device discovery python codes from the example given in https://github.com/pybluez/pybluez/blob/master/examples/ble/scan.py which are run on a Google AIY Raspberry pi. from ...
1
vote
1answer
46 views

Can't blink a LED using SPI interface on Raspberry Pi v3

As a part of my PoC project, I'm using single 5050 LED made by Adafruit. I wired it like this (LED - RPi): DI (Data Input) - SPI0 MOSI CI (Clock Input) - SPI0 SCLK GND (Ground) - GND VCC (5V) - 5V ...
0
votes
0answers
17 views

Print function gets error [on hold]

I am trying to code in Python 3 on a Raspberry Pi for the first time and I'm running into a problem every time I try to print. I've tried both of these ways as well as some other variations: print('...
0
votes
0answers
45 views

Problem with subprocess.Popen, Permission denied

I was trying write a simple script to open the Arduino IDE. import subprocess arduino = "/usr/share/applications/arduino-ardunoide.desktop" subprocess.Popen(arduino) But i recieve the following ...
1
vote
0answers
22 views

Send data BMP180 between client and server trought module socket

I would like to send data of BMP180 sensor between a client and a server with two raspberry pi 3 being that the client when executing the command get the server will give the temperature value to the ...
0
votes
0answers
14 views

Any way to keep mplayer window open

I am making a project in which my device is receiving a video URL, which plays the video using Mplayer. Once the video is played completely, Mplayer window closes. Is there any way to keep the window ...
0
votes
0answers
26 views

No reading for the LDR using MCP3008 with SPI on raspberry pi in python 3

I'm a beginner to RPi and trying to learn how to use SPI & MCP3008 to read analog signal in Python3. The output displays 0.0V all the times despite the change in the light intensity. Light: 0 (0....
0
votes
0answers
20 views

python: bluetootherror: (111, 'connection refused')

There seems to be a problem with connecting the Arduino + HC-05 to the raspberry pi 3 Here is my code from bluetooth import * import threading import bluetooth from pprint import pprint host = '98:...
0
votes
1answer
22 views

Get measured value of gpio vibration sensor (SW420)

I've managed to connect 2 SW420 vibration sensors to my rpi3 and can identify a vibration event on callback. However, I'd like to get the measured value (voltage change?) from the sensors, to see ...
1
vote
0answers
32 views

Permission Denied as root when connecting BluetoothSocket with Bluez 5.43

I've been trying to get bluetooth working on my Raspberry Pi 1 Model B+ running Raspbian Stretch Lite 4.14 with a 3rd party USB bluetooth dongle. I installed Bluez 5.43 for python 2.7, and was able ...
2
votes
1answer
29 views

Python 3 interpreter not recognizing a new installed package(python 3.5.3)

I'm new to this RPI world and also to python although I completed the basic courses I'm still getting used to this so I will appreciate your patience I'll try to express my self the best way. I ...
0
votes
0answers
37 views

Raspbian - Run Python script at startup

I have a Python script which is a Webserver. It works perfectly but I want it to start, automatically, at startup of the Raspberry Pi. I tested many things but nothing runs my Python script: crontab ...
0
votes
2answers
20 views

What does setmode, setup, output and cleanup do in the RPi.GPIO library?

I have been working on a project and everything is working. I just want a bit more insight on what every line of code does. It's one thing to write it, it's completely different to understand it. ...
0
votes
1answer
44 views

Flask server blog question

I am about to embark on my first experience with Rasb Pi and I want to utilize the code from this blog on how to stream motion JPEG thru a Python Flask server, Flask Video Streaming Revisited. The ...
0
votes
1answer
28 views

What causes this (strange?) CPU usage on Raspberry Pi 3?

I am running two python scripts from two different terminals like so: python3 one.py and python3 two.py one.py Waits for an input on GPIO 27, and then starts counting in seconds how long the ...
0
votes
0answers
25 views

Execute “render_template” and keep while loop checking if button was pressed?

I manage to read the button, but my render_template is never executed as the while look is checking the button. How can I solve that problem? @app.route("/") def main(): # For each pin, read the ...
1
vote
1answer
33 views

turn screen on and off with motion sensor

I'm working on a project which will use a PIR motion sensor to turn on a connected HDMI monitor when there's someone in the room, and turn it off when they leave. I'm new to Linux, but not to Python. ...
0
votes
1answer
36 views

gps.next() hangs, NMEA data may be bad?

I've got a few RPi's (0W's) running GPS. All have worked with the same install steps and code except the latest I just assembled yesterday. Now when I run my GPS code, I get the following prints and ...
0
votes
2answers
61 views

Transfer files from Raspberry Pi Zero W to PC over USB

I would like to transfer files from Raspberry Pi Zero W to PC over USB interface. Is it possible? My idea is to first use Pi Zero standalone to run an application, which generates some files on the ...
0
votes
1answer
41 views

Cron Job turns off the matrix MAX7219 after finishing the script

I have a script in python3 which executes and shows information in an 8x8 MAX7219 matrix and works perfectly. When I run the script directly from the .py file, the matrix does not turn off (and that's ...
0
votes
0answers
22 views

printing info from weather utility [duplicate]

I've download the weather-util on raspberry pi. Is there a way to print the info from a python script? Say you want the weather info for jfk, so the command is weather jfk.
0
votes
0answers
38 views

Unable to install vim plugin in Paspberry Pi

I am trying to install plugin for python in vim, but I am unable to do that. I removed vi tiny from Raspberry Pi and installed vi 8.0 I followed the instructions from this site: VIM and Python – A ...
2
votes
1answer
32 views

fork() Process Issue on Channel Switching via Rotary Encoder

I have KY040 rotary switcher(encoder) as shown below picture. It is the scenario that there are 5 radio stations(simple html url) in urls.txt which are read into stations list in radyoCS.py, at every ...
0
votes
0answers
13 views

Rpi -3 fail to run `esptool`

In order to communicate with ESP32 to run miropython code, I needed to install esptool on my RPI ( done successfully )- using this guide . When executing, I got an error message that it doesnot exit- ...