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.

4
votes
0answers
454 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
712 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
255 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
319 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
215 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
242 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
499 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
297 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
576 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
277 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
34 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
154 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
0answers
583 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
768 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
66 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
57 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
227 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
223 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
548 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
367 views

Raspbian Reboot Hangs

Having a bit of a problem on Raspbian Jesse. I have 2 switches which I use to shut down and restart my raspberry pi. Python does an os.system ("sudo reboot") and os.system("sudo shutdown -h now") on ...
2
votes
0answers
564 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
586 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
246 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
391 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
1k 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
674 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
915 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
559 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
16 views

Interrupts with MCP23017 using the mcp23017 dtoverlay

I'm at my wits end with this one. Okay, so we've got an MCP23017 with its INTA wired to the Pi gpio12 (bcm) in /boot/config.txt dtoverlay=mcp23017,addr=0x20,gpiopin=12 so far so good. I'm looking ...
1
vote
0answers
99 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
33 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....
1
vote
0answers
46 views

Raspberry Pi jammed after few days of continuous work? size full?

I made a project on raspberry pi 3+ and left it on over a weekend. After 4 days, when I came back, the program was not working. When I try to connect it with Remote Desktop, it was not working. I ...
1
vote
0answers
55 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
113 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
129 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
67 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
76 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
406 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
185 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
25 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 ...
1
vote
0answers
112 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
197 views

Run rpi_ws281x without sudo

I compiled the rpi_ws281x Library and the neopixel python wrapper following the instructions on https://learn.adafruit.com/neopixels-on-raspberry-pi/software The strandtest.py works using PWM on ...
1
vote
0answers
38 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 ...