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

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.

4
votes
0answers
424 views

RPI 3B and Tiny Thermal Printer - Unable to use python library

I'm having trouble hooking up my Raspberry Pi 3 Model B to my Adafruit Tiny Thermal Printer (nb: not the mini thermal printer - this is the one with a mini-USB port built in). I've got it connected ...
4
votes
0answers
649 views

Not getting a response from a connected PIR sensor

I have a PIR sensor which I'm using connected to a Raspberry Pi 3 Model B as part of a Magic Mirror project. I'm running this module for the sensor. I've had the Motion Sensor working before, but now ...
4
votes
0answers
239 views

Strange I2C behaviour

First of all: sorry for the title, I don't know how to describe further... Background: I'm working with the RDA5807M FM receiver chip. It worked fine for at least one month now. I just had jumper ...
3
votes
0answers
273 views

Rasberry Pi zero and 3 bluetooth transfer speed is slow RFCOMM

I am trying to send a series of bytes from the Raspberry Pi zero W to the Raspberry pi 3 via bluetooth. Im using the PyBluez python package. I believe that Raspberry Pi Zero has Bluetooth 4.1 and ...
3
votes
0answers
184 views

Started picamera.start_preview() in Raspbian but don't see anything

I started picamera.start_preview() in Raspbian but I don't see the preview window which I thought was supposed to appear. import picamera cam = picamera.PiCamera() cam.start_preview() <picamera....
3
votes
0answers
224 views

Latency on a Raspberry Pi camera

I'm making a flight controller and want to stabilize the x-y plane using optical flow, which requires almost instantaneous processing thus requires almost no latency. How much latency does the Pi ...
3
votes
0answers
475 views

RPi.GPIO autocompletion

Is there any way to have auto-completion when working with the RPi.GPIO in Python? I don't see it having any Python sources that could be used for it. I'm using IntelliJ IDEA, which uses PyCharm's ...
3
votes
0answers
1k views

Raspberry Pi 3 Bluetooth Baud rate

How do I increase the available baud rate of the bluetooth module for the Raspberry P1 3 model B? I have tried editing the /boot/config.txt file with: init_uart_baud=1000000 init_uart_clock=16000000 ...
3
votes
0answers
288 views

Speech Recognition ERROR

I am using a speech recognition library on a Raspberry Pi in Python that I found here and I installed it through pip. I also had to install Pyaudio of their site here. Pip would not work for Pyaudio ...
3
votes
0answers
2k views

Jack server not working on Raspbian

I wrote a little python app (using PyDub), that plays sound files. Everytime I run it, I get the these errors: ALSA lib pulse.c:243(pulse_connect) PulseAudio: Unable to connect: Connection refused ...
3
votes
0answers
558 views

Running two cameras at the same time (Pi Camera & USB camera)

I would like for my project to have one camera (PiCamera) Streaming video. And another USB Camera (PS3 Camera) taking pictures when I execute this function: def grabPicture(self): grab_cam = ...
3
votes
0answers
269 views

Slice of Radio and Ithobox

I've got a Raspberry Pi with Ciseco Slice of Radio and I'd like to control my Ithobox LINK It has an 868 Mhz RF transmitter/receiver and I also have the optional RF remote control unit which I'll be ...
2
votes
0answers
20 views

ADXL345. Bits, resolution and g's

I have a Kistler type 8921 which produces 1g (10m/s2) RMS (at 159 Hz). The ADXL345/Raspberry Pi 3 setup should produce similar g's, but currently doesn't. As can be seen, it is not just about a ...
2
votes
0answers
460 views

Illegal instruction when running python on raspberry pi

I was doing a pi project where pi communicates with a UHF ID card reader via hardware serial and read cards. Pi gets the card information through serial and upload them to a remote database. Also some ...
2
votes
0answers
1k views

RPi camera stream to OpenCV in Python

I have been searching everywhere and tested what seems to be everything in order to get OpenCV in python to accept a video stream through gst-launch-1.0 from a RPi camera connected to a RPi. So far, I ...
2
votes
0answers
1k views

Segmentation fault, running out of memory? PyQt5

I am programming code to display camera feed with my raspberry pi 3 and Raspbian. Strangely, sometimes the code shows the video and sometimes i get the Segmentation fault error. I used gdb to find ...
2
votes
0answers
225 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 ...
2
votes
0answers
699 views

High speed photography using RPi Camera module

I'm trying to capture high speed water flow movement in a small dark chamber with a cool white 5 W high power LED as a flasher. My target is to achieve quick exposure using 0.8 millisecond light pulse....
2
votes
0answers
60 views

How to manually adjust system clock for testing purposes

I have written a Python script that is set to run different functions at different days/times. I would like to test it by setting the system clock to 1-2 minutes before the dates/times that the Python ...
2
votes
0answers
53 views

Crontab + LCD display strange behavior

I have my Raspberry Pi hooked up to 16 x 2 character display the date on launch. The display has a i2c module on the I have placed this in crontab (without the sudo thingy, so user) : @reboot ...
2
votes
0answers
200 views

GPIO Edge detect setup on 3 pins, when one changes all callbacks are called

I have a PI setup with 3 sensors (reed switches) and 2 "outputs" to a relay. They are on pins (8, 10, 12) I have pin 3 setup to drive the first relay and pin 5 setup to drive the second relay. I ...
2
votes
0answers
206 views

How to use PC Joystick from Raspberry PI via TeamViewer?

I've installed TeamViewer 11 Host in my Raspberry PI 3 and I can access my Raspberry PI by using the TeamViewer. But the problem is that, I can't access my Joystick that is connected in my PC from ...
2
votes
0answers
534 views

Failed to add edge detection runtime error

from gpiozero import Button btn = Button(4) while True: print("begin") btn.wait_for_press() print("Pressed") btn.wait_for_release() print("Released") This code worked at first but ...
2
votes
0answers
523 views

Increase FPS PiCam in Multiprocessing

Currently, my system is only producing 10 FPS out of 20, which is my target. I'm barely hit 15 FPS in single grab-and-show simple code like this: from picamera.array import PiRGBArray from picamera ...
2
votes
0answers
539 views

ffmpeg on raspberry pi

Whenever I use ffmpeg inside a Python script using subprocess it doesn't work. Here is the code I am using: import subprocess subprocess.call('ffmpeg -f v4l2 -framerate 25 -video_size 640x480 -i /...
2
votes
0answers
233 views

Unexpected voltage drop on GPIO 16

I have written a sprinkler timer system (Python) for the Raspberry Pi 2B+. The Pi is connected to a 2 line LCD, 4 switch circuits, and an 8-way relay board with all 8 relays being used, and the 5V and ...
2
votes
0answers
1k views

Emulate a Bluetooth Keyboard with a Raspberry Pi 3

Raspberry Pi 2 Model B (Raspbian Wheezy and bluez 4.99) Executes perfectly using a Bluetooth dongle. Raspberry Pi 3 Model B (Raspbian Jessie and bluez 4.99) Attempting to pair with Windows laptop ...
2
votes
0answers
7k views

Using Python with Bluetooth on Raspberry Pi 3

Following this tutorial I successfully ran PiTooth on the RPi2MB (Wheezy). Following the same tutorial on the RPi3MB (Jessie) I get the following message "Could not configure bluetooth. Is bluetoothd ...
2
votes
0answers
364 views

Raspberry Pi Robotics: How to follow line?

I'm making a raspberry pi robot in Python and it moves, but it does not follow the line and I am using an infrared line sensor. I think that I have done everything properly. Here are some results by ...
2
votes
0answers
955 views

SpiDev - spi.xfer([xxx]) -> Invaild argument error -> what?

I got trouble with a seemingly dumb-proofly simple code: import time import pigpio import spidev DS = 17 STCP = 27 SHCP = 22 MR = 5 spi = spidev.SpiDev() spi.open(0, 0) spi.xfer([0b10011011]) ...
2
votes
0answers
639 views

Low-latency SPI for MCP 3008

So, I am using the SPI interface on the Pi 2 model B to communicate with a MCP 3008 ADC chip, following the tutorial on http://www.raspberrypi-spy.co.uk/2013/10/analogue-sensors-on-the-raspberry-pi-...
2
votes
0answers
2k views

MPU6050 Python Library

I would like to use my MPU6050 gyro/accelerometer in some projects but I can't find a good library. I would prefer it to be in python but can deal with C++. I want something where I can do a simple ...
2
votes
0answers
895 views

OpenCV. Can't open video from usb camera on the screen

When I'm trying to start simple code, the frame opens and don't respond. import numpy as np import cv2 cap = cv2.VideoCapture(0) while(True): ret, frame = cap.read() cv2.imshow('AIR',frame) ...
2
votes
0answers
554 views

Error running a simple python script at boot

I am attempting to create a button on my Retro Pie emulator case (A gutted NES), using the old reset switch, to exit out the of current game and go back to the menu. Then I realized it just required ...
2
votes
0answers
116 views

GPIO goes high on first initial run of script - please help get my ECTO 1 on the road!

I am having a few problems with my script, on a fresh boot of my pi, the GPIO Port goes High and switches my relay when I run this script, however, it doesn't do it after I initially run the script, ...
1
vote
0answers
21 views

Programming bluetooth module of RPi 3 B

I'm trying to scan the invironment of the Pi for active bluetooth devices. I'd like to have MACs, names and signal strength. Of course I can run bluetoothctl in the shell and then use scan on command ...
1
vote
0answers
51 views

Sense HAT LED matrix displays incorrectly

When I try to light up one pixel at a time, the whole column lights up. This happens no matter what color I set it to. The rainbow when the pi boots up is also distorted since the columns are lighting ...
1
vote
0answers
60 views

How can I pause a video of omxplayer with out using keyboard?

I am working on my project that can display video when a magnet (signal ) is detected using a hall-effect sensor. Then after, if the magnet is removed from the sensor the video has to pause (not to ...
1
vote
0answers
76 views

How can I pause video of omxplayer using python script?

I am using omxplayer to play videos. The video played very well. But I can't pause the video using the commands below. Can any one help me how to pause my video using python script? Here, is the ...
1
vote
0answers
41 views

Rasperry, flask and missing libraries

I have installed Apache2 on the Raspberry and the idea is to run a Flask app. I managed to write a very simple app: import requests from flask import Flask from flask import make_response from flask ...
1
vote
0answers
66 views

Having trouble on one of the raspi official projects “getting started with GUIs”

I have raspi 3, and working on "Getting started with GUIs". I am currently on this page (https://projects.raspberrypi.org/en/projects/getting-started-with-guis/11) and having trouble at the line ...
1
vote
0answers
208 views

RPi.GPIO - Properly Wiring and Setting Up Pins for Button Inputs

Edit: Breadboard, schematic, and code updated. I accidentally fried my Pi by shorting it out through the GPIO pins, so I figured it would be a good idea to ask for some help before trying my current ...
1
vote
0answers
148 views

Python HID API's for RPi's

I realize that solutions exist for having an RPi emulate an HID device (Can the Pi Emulate an HID device with via USB?) but are there any existing API's that can achieve the same thing as https://...
1
vote
0answers
60 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 ...
1
vote
0answers
103 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 ...
1
vote
0answers
33 views

Unwanted calls of program with GPIO

I configured a Raspberry Pi 2 with a button. I have a script in python, which will call a command, if someone press the button. The command doing a sip phone call to a phone server (cisco ...
1
vote
0answers
109 views

Displaying only video/image while python program running on background

I have a Raspberry Pi 3B with a Python3 code running 24/7. Right now, I'm running Raspbian Stretch desktop on console mode with no I/O. I only connect a screen via HDMI and an USB keyboard for ...
1
vote
0answers
703 views

ERROR:sandbox_linux.cc(344)] InitializeSandbox() called with multiple threads in process gpu-process

I am using a Raspberry Pi: pi@raspberrypi:~ $ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 9.3 (stretch) Release: 9.3 Codename: ...
1
vote
0answers
518 views

How to detect audio sounds with Raspberry Pi 3 using Python?

I'm creating a voice recognition system using Raspberry Pi 3 using Python and taking inputs (voice commands and audio sounds) through a microphone. I have been able to get voice input using the ...
1
vote
0answers
128 views

Simultaneous sampling using ADC and displaying in graphical LCD

I am using Raspberry Pi 3 Model B and MCP3008 for sampling my analog signal and the sampling frequeny is approximately 10 kHz. I need to display the sampled values in 3.5' inch graphical LCD. I just ...