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.

Filter by
Sorted by
Tagged with
0
votes
0answers
298 views

RPi.GPIO is never reachable after upgrade to Python3

yesterday I run an install of Python3 on my Raspberry Pi 3. The preinstalled Python version was 2.7.1 If I run a scrip now, i reveive the following error message: import RPi.GPIO Traceback (most ...
0
votes
1answer
517 views

Opening a folder using python code [closed]

I need to create a python program which is saves as a shortcut ,which displays many options like camera , flash on and off and opening a folder button, ive did everything but opening a folder or a ...
0
votes
0answers
70 views

Display pihole API information on Nokia 5110 [duplicate]

I want to use the Nokia 5110 screen to display my stats from pihole. I'm not sure if it's able to be done. The screen is able to display starts from pimonitor so I'm assuming it would be able to ...
0
votes
0answers
105 views

Inconsistent 433Mhz decoded results for same remote controller button clicks

Purpose Using RF receiver to capture signal from light switch remote controller within Using RF sender to emulate signal captured from remote controller to work with Homebridge Result Same button ...
0
votes
2answers
433 views

PIR Module False Positivesq

All I am working with a PIR Module and a camera for a project to provide text messaging when motion is detected as well as taking a picture. I am seeing a large number of false positives from the PIR. ...
0
votes
1answer
628 views

pigpio ESC (Electronic speed control) problem

I'm trying to control a BLHeli ESC (link) controlling a Gemfan motor (Gemfan RT-2205 2300KV - 3-4S - 425W - 1160g) with a Raspberry Pi 3B with a python program which I've written two days ago: from ...
0
votes
0answers
914 views

Python script as systemd service not running [duplicate]

I know there have been a lot of similar questions, but for the life of me I can't figure out what's wrong! I have a script that forwards a port via ssh tunnel, and it works pretty fine, and I want to ...
0
votes
1answer
4k views

Reading registers through pymodbus

I have been trying to use pymodbus to read registers from a power meter and searching around here I found a useful code from the question I attach in the end of this post. So I wrote/copied the next ...
0
votes
3answers
3k views

How to call and run Python file on raspberry pi using web based Button?

I have created .py file that is doing job of communicating on UART quite well. Now I want to run that file on button clicking from browser. I have tried exec("python filename.py"); in PHP but that ...
0
votes
1answer
389 views

Tkinter application window in front of Chromium in Kiosk mode

On my Raspberry Pi I have created a tkinter application with one button and configured Chromium to start in kiosk mode. In my python application I set the following: root.lift() root.wm_attributes("...
0
votes
1answer
484 views

Lego EV3 infrared sensor to raspberry pi 3 direct connection via UART?

I connected this sensor with raspberry via UART( I have found that this IR sensor is one of few Lego sensors that connects via UART), and make serial_read and serial_write python scripts, just to test ...
0
votes
1answer
3k views

Turning RPi Official Display(Touchscreen)'s backlight on/off from python on pi user account

I'm not sure if this issue belongs here or on the python side, but hopefully someone can help me on this, and others can benefit here as well. I've managed to customize the commands found in this ...
0
votes
1answer
5k views

Installing Kivy on Raspberry Pi 3 and making it work with Python 3.4

(This may be a duplicate of an unanswered question at How do I Install Kivy for python 3.4 on my raspberry? Is that possible? , but I'd like to add some details to this.) I have followed the default ...
0
votes
0answers
63 views

I can't find the file “font5x5.py”

I have a serious problem, I've intalled this But in my RPi, I can't find and edit the "font5x5.py". But when I import it with another script, it work. Can you please help a french beginer ??
0
votes
0answers
171 views

Pictures won't copy to thumb drive, “Duplicate image error” when none exists, empty folder

I used a raspberry pi 3 running Pixel to do a timelapse image capture using a python script that runs @reboot through crontab. @reboot sudo sh Timelapse.sh This runs a python script that camera....
0
votes
1answer
73 views

Different modules

What are the things to be considered when connecting 3-4 different modules to raspberry pi3? Ex: i am using 4 modules namely RFID reader, hall effect sensor, gps and some push buttons. Need to ...
0
votes
1answer
1k views

Integrate Python Script into Flask App

I'm struggling with importing the variables from my Python Script (pulsecount.py) into my Flask App (routes.py). If I simply do it like the following script, the code is executed, but it only shows ...
0
votes
1answer
284 views

gamepad/joystick-> raspberryPi->nrf24l01->arduino; variable confusion between cpp and python

I'm trying to operate an r/c robot with joystick and a raspberry pi running Debian and an nrf24l01 to communicate the joystick commands to the arduino on the robot. I only really need forward/back ...
0
votes
0answers
1k views

Automatic sending RFID tag ID to MSSQL on a PC through Raspberry Pi using Pymssql

A RFID-RC522 connected to Raspberry Pi and a python script which reads RFID tag and prints out the result of the reading. And the aim of the project is to transfer the ID of the RFID tag to a ...
0
votes
1answer
132 views

Rasberry Pi LED GPIO using Python

In my project I invoke a python script via node.js on my Rapberrypi B+ model and what the python script does is that it turns on the BCM GPIO ports as per the python arguments passed through the ...
0
votes
0answers
3k views

Python Tkinter GUI lagging with While loop in main loop

When I run the code with the while True: loop included within the root.mainloop() it is making my GUI lag heavily and the code does not run as smoothly as I would like. I am wondering how I make my ...
0
votes
2answers
1k views

Python Serial reading a USB Arduino, all I get is 0s

I am trying to read an ads1115 monitoring a current shunt so it's reading in millivolts. All I need is to be able to read the serial output from the arduino serial. When I bring the arduino up with ...
0
votes
1answer
76 views

Port Mass SD image writer ARCH -> Raspbian

Data: Raspberry Pi 3 B running Raspbian+PIXEL Hello, I'm attempting to follow along with this project where a Raspberry Pi can be used to flash multiple SD cards with an image file as a batch. The ...
0
votes
1answer
3k views

Scan Distance from Eddystone Beacons

I would like to read an Eddystone Beacon using my Raspberry Pi 3 to calculate distance from the beacon. I can't find any resources to do this from the official Eddystone documentation. How should I go ...
0
votes
1answer
477 views

Code runs VERY slowly. Any tips to speed it up?

The following code is meant to create 6 GPIO pins and be able to change the output of each of those pins depending on the letter pressed (I made it a function because I will have to code each letter, ...
0
votes
1answer
4k views

UART Send/Receive not working

I'm trying to get communication though UART with a freedom board working with Python3 on Raspberry 3 Jessie. This is my first attempt and I don't have any experience in that. The code of the freedom ...
0
votes
1answer
122 views

Weird square on terminal

Im getting this weird square that shows up in pi terminal. It only appears on the first byte of data read in from the UART. The byte data is there but there square is overlapped over it. Anyone know ...
0
votes
1answer
276 views

How can I stop this script (date an time with I2C LCD)

I found this script to show date an time on this site: http://www.circuitbasics.com/raspberry-pi-i2c-lcd-set-up-and-programming/ Once is running how can be it stoped? I like the idea of showing the ...
0
votes
0answers
27 views

Running Arduino command on Raspberry Pi 3 [duplicate]

I am a mechanical engineering student who is currently doing my final year project. Basically I am trying to develop coding for the cornering movement for in pipe robots, but my problem now is that ...
0
votes
0answers
304 views

PocketSphinx - ALSA IOError: -9997 while trying to Decode Speech

I am trying to use Pocketsphinx for voice recognition. When I was trying to include it in python, using this file: #!/usr/bin/python from os import environ, path from pocketsphinx.pocketsphinx ...
0
votes
1answer
786 views

NoIR V2.1 camera auto white balancing

I have a Raspberry Pi NoIR V2.1 camera. I am working with the NIR (940 nm) LEDs and I saw that I was getting funny/weird colors, so I assumed that it is due to the white balancing, so I switched off ...
0
votes
0answers
355 views

How do I output power to GPIO pin?

I have GPIO to USB adaptor. There is a small light connected to the USB end. I have 4 TTL cables Red, Black, Green and White. By black cable is in pin 6 (ground), white in pin 8 and green in pin 10. I ...
0
votes
1answer
676 views

Sense Hat RGB Code

I am a new programmer, trying to learn python. I am using the sense hat to mess around with, I want to make it like rotate RGB colors. I am using the sense.set_pixel and passing in the x,y and r,g,b ...
0
votes
1answer
581 views

Use MCP23017 pin for read data

I just get an MCP23017 circuit and wired it to my raspberry pi like in datasheet. I am able to set pins for hight/low (tested with leds) using this code: import wiringpi as wiringpi from time import ...
0
votes
1answer
321 views

Setting up the Raspberry Pi as a client on a sever

I'm attempting to give my Raspberry Pi a static IP address on an ethernet network that I am controlling from a Windows machine. I want to be able to send my PI UDP packets directly from my server via ...
0
votes
0answers
456 views

Recording sound of 4 USB microphones connected to Raspberry Pi and calculate TDOA

For my project to locate a sound source, I need to calculate the Time Difference of Arrival (TDOA) of 4 microphones. I want to connect this 4 microphones with a powered USB Hub to my Raspberry Pi and ...
0
votes
0answers
288 views

Update Python Libraries directly on SD Card

I do not have an internet connection at my house, I can however connect to the internet where I work. Is it possible to install and update python libraries directly from my mac onto my SD card.
0
votes
1answer
842 views

Audio Processing Issues in PyAudio in RPi

Basically, I want to analyse the spectrum of the input audio stream to my Raspberry Pi. I have configured my Audio USB Adapter and ran sample tests on Play and Record. I am using PyAudio to take ...
0
votes
1answer
647 views

Using gpio from CLI to trigger a rising or falling event detection

I have a python system script with various functions. I have multiple buttons hooked up to the Pi and I am using this code: import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(22, GPIO.IN, ...
0
votes
1answer
5k views

Active Long Range RFID system for Raspberry Pi 3

I have bought those cards: UHPPOTE 2.4Ghz RFID Active Card for Long Distance Range Reader Vehicle Parking System. I need to buy certain RFID readers to be able to read data from those cards and work ...
0
votes
0answers
54 views

Rpi lockout keyboard for x seconds Python

Ive made a python scrpit that detects keypress on numpad to run a function using getch (eliminates having script ontop all the time). I did find 2 examples one uses pyhooks (win32) and other uses /...
0
votes
0answers
138 views

Raspberry Pi 3 freezes after GUI Python program is minimised/closed

I am using the Raspberry Pi 3 alongwith its 7-inch screen. I have developed a software that shows real-time temperature on the screen alongwith some other functions. The software runs fine without ...
0
votes
1answer
378 views

twitter api Twython Raspberry Pi error

I got an error in the twitter api Twython on my Raspberry Pi? ERROR: from .api import Twython from requests_oauthlib import 0Auth1, 0Auth2 ImportError: No module named requests_oauthlib
0
votes
0answers
597 views

Problem writing to log file by first run python script

At the first run python script nothing is written to the log file "cpu_temp.csv". When I run the second time then the data is written to the log file. The script is to extract the temperature from ...
0
votes
1answer
314 views

No print output on raspberry IDLE

I've been trying to create a program that split few different section of my main OpenCV program to increase fps. The first thing i ever think of is the Pipe() function from my friend. I've tried this '...
0
votes
1answer
398 views

Save TTL pulse input time while recording video from Raspicam

I am recording video using Raspicam and saving the video buffer as well as timestamp for each frame using the following script: import io import time import datetime as dt from picamera import ...
0
votes
2answers
2k views

12v relay not turning off with usual gpio off comands but turning off with gpio.cleanup

I have SRD-12VDC-SL-C relay module which I want to control using raspberry pi but unfortunately, none of the gpio off commands are working. However GPIO.cleanup and turning pin to input is working to ...
0
votes
2answers
284 views

Pigpio belt speed encoder

I'm trying to read pulses from an encoder to measure belt speed. My encoder is 500 ppr. I have approx 2400 pulses per meter and I need to measure speeds upto 450 meters per minute. Can anyone help ...
0
votes
2answers
6k views

Install Python Module pyodbc on PI?

I am trying to connect to a MS SQL database and get some values over a Raspberry Pi. I have my Python script and it works well on windows, but i dont know how to install the 'pyodbc' module on the PI. ...
0
votes
1answer
589 views

Understanding struct.unpack code

Hello great community of helpers! We new programmers greatly appreciate your continuous help. Thank You! Can you explain this 1 line of code below... - Or break it down into separate chunks. I ...

1 45 46 47 48 49 52