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

Pigpio on callback get value

I currently have some code that I found that constantly outputs a value from a digital caliper. However, I want to modify this so that it is inside a function that can return that is returned from ...
2
votes
1answer
649 views

Raspberry Pi 3 & Arduino: [bluetooth.btcommon.BluetoothError: (112, 'Host is down')]

I am trying to send informations from Raspberry Pi 3 to Arduino Uno with bluetooth. I managed to connect the Arduino's bluetooth module with the Raspberry Pi. But I have this error when I execute my ...
1
vote
1answer
2k views

“404 not found” error when requesting Python with Lighttpd through CGI

I've installed lighttpd and gotten it to serve /var/www/index.html just fine, but I haven't gotten it to run a Python script yet. I enabled CGI and set it's match case and directory as instructed in ...
1
vote
1answer
71 views

How do I get a list of only bluetooth audio devices?

I'm currently using pexpect in python to use bluetoothctl. I can get a list of all bluetooth devices, but is there a way to narrow down the list to only audio devices (bluetooth speakers, headphones). ...
0
votes
1answer
526 views

Listen for certain keyboard input and insert to SQL Server DB

I have a USB NFC reader (acts as an emulated keyboard that types out the 10 digit ID number on the card when scanned). I want an app to listen for this input and when it sees 10 digits, I want it to ...
1
vote
1answer
441 views

Access the display from a python app running as a service

Problem: The code below can't access the display when running as a service. I have my raspi hooked up to a touch screen monitor in the kitchen and I've attached a Passive Infrared sensor to the GPIO ...
1
vote
1answer
77 views

Read Incoming Bluetooth Audio On Pi With Python

this is my first post on here! I am trying to make my raspberry pi 3 a bluetooth speaker which synchronizes beat of the music being played from a phone to an LED light strip. For the LED light ...
1
vote
1answer
425 views

Problems Connecting to Bluetooth devices through python

I am trying to write a simple python script that connects any bluetooth audio device to the raspberry pi 4. I keep getting "bluetooth.btcommon.BluetoothError: (111, 'Connection refused')" Here is ...
1
vote
2answers
104 views

BlueZ BTGATT-client.py WriteValue

I had a successful attempts with BlueZ-5.50 > test > example-gatt-client.py with ESP32 set as HeartRate Sensor Server.I am able to read from ESP32 which i modified to suit the BlueZ example. ...
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 ...
2
votes
1answer
186 views

Rpi Zero W - How to automatically accept bluetooth pairing and log mac and info request?

I am using Raspbian Stretch 9.4 on a Zero W. The goal is to deploy it headless for long periods of time where it will broadcast a specified bluetooth signal. When someone tries to connect to it, it ...
0
votes
1answer
29 views

Wierd output in python from serial connection output

Output: b'00000-000000\r\n' b'450302198011281530\r\n' b'' b'' b'+\x00--To--\r\x12-\x00000800\r\x12-\x00000800\r\x12' b'-\x00000800\r\x12-\x00000800\r\x12' b'-\x00000800\r\x12-\x00000800\r\x12' ...
0
votes
1answer
1k views

Play different videos with omxplayer depending on reported sonar distance

I am a new to Python. What I want to do is that playing different videos depends on distance using Ultrasonic sensor. For example, if the distance <= 20, play movie1. if the distance > 20, play ...
0
votes
0answers
19 views

Temporary failure in name resolution/Python

I have following code I am running on a Raspberry Pi Zero. It completes couple of iterations without any issues, after which it throws Temporary failure in name resolution error. All subsequent ...
1
vote
1answer
2k views

Kivy on Raspberry Pi: Mouse cursor not showing

I'm running kivy on a Raspberry Pi. I accepted that apparently you can't get around the fullscreen, but I can't get the cursor to show either. I tried by adding touchring = show_cursor=true to the [...
-1
votes
1answer
87 views

problem when running the python application in /etc/rc.local in console mode

I'm coding an application to run when starting raspberry, however when trying to run this error is returned: QXcbConnection: Could not connect to display My application is done in python with qt ...
0
votes
0answers
35 views

on/off button GPIO python

I'm working on a project from Marcel on instructables: https://www.instructables.com/id/Raspberry-Pi-Radio/ Right now I'm modifying the code a bit and trying to add the on/off button. When I run the ...
0
votes
1answer
45 views

How to clean up gpio pins properly?

I'm a newbie with Raspberry Pi as well in python and node red. So my goal with my project is to make a DIY irrigation systemm. I have an RPi, which reads value from the soil moisture sensor and ...
1
vote
1answer
65 views

Is this a Python quirk or an imperfection in the Raspberry Pi input?

I am running out of ideas to get this Python code working the way I want it to. Please take a look at my code and help me figure out what's wrong, or if it's a hardware issue with the Pi causing my ...
0
votes
2answers
737 views

Python MCP23017 16 ch. I2C input losing a bit

I bought a MCP23017 and doing some small test with it. I've made a simple Python script to make read_out of pin state. Can anyone explain to me, why I'm losing a bit when GPIO_A7 is triggered? I've ...
2
votes
2answers
2k views

Rpi to Arduino Serial UART Communication Tutorial

I'm trying to connect my Arduino to my Raspberry Pi using the GPIO pins. I understand that the Pi uses a 3.3V signal while the Arduino uses a 5V signal so I bought a bi-directional logic level ...
2
votes
1answer
4k views

Different Frequencies with Piezo Buzzer - Python

I have a multiple choice question game, and I'm wondering how to hook up a piezo buzzer to make a sound when someone puts in an answer. Basically, I need two functions - a sound for when they get it ...
0
votes
1answer
709 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, ...
1
vote
1answer
2k views

RFID RC522 Reader & Chromium Web Page

I'm having a bit of difficulty locating a specific example, however I have found people referencing that they have accomplished what I am looking for. At a basic level, I have a webpage being served ...
1
vote
1answer
5k views

Error trying to install python-firebase on Raspberry Pi 3

I have installed requests but I'm unable to install the python-firebase package. I want to fetch data from firebase on my Raspberry Pi 3. I have used the following code to do the same on my PC. from ...
1
vote
2answers
1k views

Raspberry pi 3 reading serial port

I have a python code that reads the serial port of the raspberry pi 3to obtain GPS positions from a fona808. The code works for some time and then throws this error. Traceback (most recent call last):...
0
votes
1answer
31 views

Unable to read serial port with python script but can write [closed]

I have a microcomputer that is initiated from a pico terminal script establishing a ttyUSB0 and baudrate. The micro is programmed only to respond to a small list of alphanumeric inputs. Enter x into ...
0
votes
1answer
644 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 ...
0
votes
1answer
43 views

Modifying what is shown in the uART

I am working on establishing user communication (one may say a basic UI) from the user's PC to my Raspberry Pi, where the RPI would accept pre-defined commands from the user via uART and then process ...
0
votes
0answers
13 views

How to make a Led Visualizer with USB audio input

I've been trying to figure how to get this to work or a while now, I've found a GitHub for a led strip visualizer called ledvis and it supposedly works with audio input, but the depository is very ...
0
votes
1answer
777 views

ultrasonic sensor stops after giving some reading when running in thread on tornado websocket python

I am using Ultrasonic sensor to get reading and am using python program for getting reading. And am using Raspberry pi for this. when am running python program independently its giving me reading ...
0
votes
2answers
2k views

Kivy won't listen to “fulllscreen” setting

Working on a Raspberry Pi Model 3 B, running raspbian. Running Kivy v1.9.2-dev0 and Python v2.7.3 Trying out one of the Kivy examples but for some reason the application won't come up in "Windowed ...
0
votes
1answer
25 views

MG 996R Micro servo Using Raspberry

I have a MG 996R micro servo which I am using with a Raspberry Pi and Python. It seems that this servo is not working with Python. I have tried experimenting the values, increasing and decreasing of ...
0
votes
0answers
56 views

Powering capacitive soil moisture sensor from 5V Pin

I'm completely new to RPi, and I'd like to make a garden project, at first I would like to measure the soil moisture. I purchased one of these sensors https://www.amazon.com/Analog-Capacitive-Moisture-...
1
vote
1answer
2k views

Problem with GPS module and Python

I copied a program from the Adafruit webpage to test my GPS module and before running it I installed the Python gps with sudo apt-get install python-gps but when I run the program I get this error: ...
0
votes
1answer
544 views

Kumantech 3.5" LCD Touch Display, Python Library

I've a Kumantech 3,5" LCD Touch Display in front of me. I'm trying to find a python library to controll the LCD, because i don't want to use x or just to console. I couldn't find any. And I couldn't ...
0
votes
1answer
536 views

sudo pip install packagename not working

sudo pip install packagename not working... I am not able to install python package using pip.
0
votes
1answer
319 views

Camera feed sent through TCP socket gets stuck sometimes

I am getting the camera feed from a camera on a Raspberry PI to the computer using a TCP socket to use it for openCV. It works well with minimal delay. However, sometimes the frame gets stuck(freeze) ...
0
votes
1answer
33 views

Opening multiple serial port slows down USB speed

note that this is a duplicate of my question on stackoverflow I am currently working on a software that use Python3 (pyserial) to interface with a lot of serial port (~24) on a Raspberry Pi Compute ...
0
votes
1answer
2k views

Displaying a continuously updating time stamp on a 10 minute video

My objective is to print a continuously updating time stamp on every second of a ten-minute video recording instead of one that updates every minute. I'm running the picamera module of python version ...
0
votes
1answer
50 views

Concurrent task handling on Raspberry Pi specific applications

I'm hoping that this is more relevant to the RPi exchange as a lot of my key concerns relate to issues with GPIO/PWM/serial bus usage with concurrency. I'm currently writing software for a robotics ...
4
votes
3answers
4k views

Multiple GPIO Buttons vs Matrix Keypad

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 ...
-1
votes
0answers
8 views

PHP requesting shell to run Python script failer (err int==1)

Script 1 (bash): checks if there is internet. Yes -- 1 to Q.txt No -- 0 to Q.txt Script 2 (php) if Q.txt == 0 go to wifiSetup.php wifiSetup.php Takes SSID, and encodes password as PSK, saves at wifi....
5
votes
4answers
8k views

Connect sim800 to Raspberry PI (RX, TX)

I've been trying to connect my sim800L to my Raspberry pi 3 model B (rasbian) but without success... I'm at the very first step, and since I'm new to Raspberry pi, I don't understand very well how it ...
0
votes
1answer
924 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 ...
3
votes
1answer
167 views

Problem sending analog read values over serial

Ok I apologize as I have edited this quite a bit, but I have narrowed down the problem a bit more. For some reason I can't transfer values from my arduino analog pins?? I am trying to send values ...
1
vote
3answers
47 views

How can Rpi python GPIO 5V relay control a 12V solenoid door Lock? [closed]

I am trying to connect a 12V AC/DC lock to my Raspberry PI 3B+ so I can control it using python3 on the raspberry pi. Does anyone know anything I can do. Here are my parts: Electric lock: https://www....
0
votes
1answer
232 views

Error executing ifdown and ifup command

I'm running a python script to configure the wifi interface, but I'm having a problem with the ifdown and ifup command. It looks like this command has been replaced by: sudo ip link set wlan0 down ...
3
votes
1answer
239 views

Sending a binary data stream to a GPIO at a certain frequency

I would like to send a random binary data sequence to a rpi GPIO at a particular frequency and then read the data stream off a scope. Is there a way of implementing this through python?
0
votes
1answer
19 views

playing music from stream [closed]

I have a raspberry pi 2 model B and a raspberry pi 1 (I think, it doesn't have any version number on it and I have had it for a long time and I don't quite remember exactly the version). I think the ...

1
2 3 4 5
54