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.

688 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
2k views

Push button + LED + sound

sorry i'm new to this and it might sound dumb, but I have to achieve the following task: You have three push buttons. Each button is connected to a pin. When the switch is pressed, an LED which is ...
1
vote
0answers
1k views

pip can not install pillow into virtualenv

I tried to install pillow inside a virtualenv under the interpreter: $VIRTUAL_ENV/bin/python3.4 I used the command: pip install pillow and got the following error: Traceback (most recent call ...
1
vote
3answers
351 views

How to display gpsd.utc using paint or similar method

I am receiving reliable gps data from my Adafruit gps sensor. I would like to to show the gpsd.utc data across the screen so that it appears like a regular clock. I have the following code which shows ...
1
vote
0answers
3k views

RFID RC522 Stops reading data after reading data continuously

I'm trying to make RFID RC522 work with my Raspberry Pi 3 B+. I use the library MFRC522, and the the sensor can read data most of the times. However if I just put the card on the sensor it will stop ...
1
vote
0answers
56 views

How to implement an echo-service over bluetooth smart

I'm trying to find examples of how to implement a service over bluetooth smart (ble). I would prefer a python implementation. The step i'm most interested in is the bindning between ble and the ...
1
vote
0answers
77 views

Python Image Slicer install failing on Ubuntu Mate

I've got a raspberry pi 2 running ubuntu mate. It comes pre loaded with python. I attempted to install image_slicer module using pip install image_slicer however I recieve this error dialogue: ...
1
vote
0answers
416 views

Compression at Beginning of h264 Clip

I'm using a pi zero and the v2.1 camera to record a series of video clips over a certain duration with pauses in between. The issue is that at the beginning of each clip there's a noticeable increase ...
1
vote
0answers
1k views

Python vlc bindings & raspberry pi HW acceleration

I managed to install vlc on raspberry pi 2 with hardware acceleration as described here: https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=59814&sid=65d833a90f1ee134cb57523599e1c8aa and ...
1
vote
0answers
79 views

GPIO unexpected behaviour after 10 hours of running python script

I have a python script running as a service on Raspbian Jessie that watches for a button being pressed and lights an LED when it is done. Initially everything works as designed, however I have found ...
1
vote
1answer
897 views

py-spidev and ADNS3080

I have been trying a lot to deal with the flow-motion sensor but I couldn't arrive to a clear result. It might be I can't understand the procedure.. I'm using cs1 on raspberry Defining the spi by ...
1
vote
1answer
2k views

Issues with Kivy on Raspberry Pi 3 with 3.5 in Touchscreen

I followed every guide I could find on installing Kivy to Raspberry Pi. My touchscreen works totally fine. Trying to launch various Kivy demos will result in what seems to be a partial launch, but ...
1
vote
0answers
769 views

Rpi2 image on a Rpi3: Module spi-bcm2708 not found

I was using a RPi2 with an RFID-RC522 Board. Now I bougth an new RPi3 because of the included WLAN. I am trying to use the same image I use with my RPi2 in my RPi3 now. But I encounter a very ...
1
vote
0answers
246 views

Using Raspberry Pi 2 B with Pan Tilt and OpenCV 3.0.0 for the 1st Time

I am very new to Raspberry Pi, and This is my first time using it. I have read a lot from the documentation on the official website, and I really got great things. After that I installed OpenCV 3 with ...
1
vote
0answers
179 views

Jasper on RaspberryPi2 not starting

I tried using the jasper on RPI2 and followed the github for my installation and configuration. I am getting a following error which i could not solve. please help me out. < ***********************...
1
vote
0answers
540 views

starting and ending a script with a buttonpress

I'm trying to integrate a button into a simple alarm project of mine but am having trouble activating/deactivating the alarm with a button press. Using Raspberry Pi 2 - Raspbian Jessie My wiring is ...
1
vote
0answers
3k views

Setting up raspberry pi for bluetooth low energy (bluez, bluepy)

I am trying to set up a brand-new Raspberry Pi for bluetooth communication using bluez and bluepy tools. This Raspberry Pi is brand-new and running NOOBS. My terminal history is the following (these ...
1
vote
0answers
247 views

Blinking LED - start and stop

This is my first post here so HELLO and sorry if I'm posting in the wrong place. Do you know a simple bit of Python that will set a LED blinking indefinitely until it's told to stop? Control will be ...
1
vote
0answers
759 views

Open a URL in Epiphany Web Browser from Python Script

So I am trying to open a URL in Epiphany [ let's say for example http://www.google.com ] from a python script. My python script is as follows: import os string = "DISPLAY=:0 xdg-open http://www....
1
vote
0answers
535 views

Unmount USB Camera

I'm working in a Python app with opencv and a USB camera. Sometimes the camera driver throws an exception: OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /home/pi/opencv-2....
1
vote
0answers
687 views

Can't connect to raspberry pi 2 over bluetooth with MIT App Inventor

I have a raspberry pi 2 with a bluetooth USB Dongle, and i've been trying for hours to connect it with an app I created on app inventor. The app is simple, just sending a string, and i've tried to ...
1
vote
0answers
164 views

I have followed the Adafruit Tutorial for using the LED matrix Backpack But Get “No module named Image” error

I have followed the instructions here: https://learn.adafruit.com/led-backpack-displays-on-raspberry-pi-and-beaglebone-black/usage They have not worked and when I try to run the test python script I ...
1
vote
0answers
124 views

How to programmatically determine the name of a connected HDD?

I'm hoping this is a very simple issue with a simple solution. I have a raspberry pi and an external hard drive that I am writing data to. I would like to know if there is a way in python, to ...
1
vote
0answers
107 views

Installing python-blosc on arch

It appears that python-blosc is supposed to work on the pi, but on my rpi2 running arch, after cloning the git repo and running python setup.py install, I'm getting the output below. Anyone else have ...
1
vote
0answers
479 views

ERROR - A transport exception occured

I'm trying to get my Pi to automatically test the internet speed using the speedtest-cli When I run the command through the terminal itself, it works just fine however, I want to run it off my phone ...
1
vote
0answers
469 views

Connect Adafruit Ultimate GPS Logger Shield and Raspberry Pi 2 B

I'm trying to connect Adafruit Ultimate GPS Logger Shield with Raspberry Pi 2 B, and it still not working. I tried to connect: Gnd, Rx, Tx, 5v. And it have signal at FIX leds. I also setup some ...
1
vote
0answers
2k views

How to start a Python app from the Windows 10 IoT remote Powershell terminal?

I have deployed and successfully run a Python app from VS2015 on my Raspberry Pi Win 10 IoT, however, I cannot figure out how to start the Python app when remoted in to the computer via Powershell. I ...
1
vote
0answers
579 views

Y value of image obtained using Picamera Python documentation fluctuates wildly

I have been working with picamera python analysis class a bit lately. What I am using is here to get a YUV array, and then perform some simple analysis on it. When I try to isolate the Y page of the ...
1
vote
0answers
447 views

Control the inclinometer with RS232 or UART

I have bought an inclinometer today to try some things. Inclinometer has two communication port; RS232 and UART. Which one should I select? Actually I tried both but none of them worked. I have ...
1
vote
0answers
1k views

Connecting multiple devices with UART

So, I have the following components: Gertbot SparqEE Shield My aim is to connect these to a Raspberry Pi Model B+, so that they can work together. There are no issues when I connect these ...
1
vote
0answers
258 views

Launching a python script in IDLE3 works but in terminal I get an error on a ConfigParser

I've created a Python program for my raspberry PI with Raspbian. When I run it using IDLE3 (my program has been created with Python 3.2), it works fine. As I'd like to run this python script at ...
1
vote
1answer
440 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
0answers
100 views

2 scripts need every frame from NOIR camera board at same time

I have two opencv2/Python scripts running at the same time on the same Raspberry PI. A streaming server script based on this, that outputs a live camera feed to the web a motion detection script, ...
1
vote
0answers
1k views

kernel Disabling IRQ #49

I am using the RPi_GPIO library in a python shell to read a raw wireless signal using the wait_for_edge() function in a loop like so: while True: GPIO.wait_for_edge(26, GPIO.RISING) print 'R' ...
1
vote
0answers
542 views

IRW does not show any thing

I want to use an infrared remote control. I'm using an infrared diode tsop38238. first I disabled the device tree because mode2 did not work at the beginning. After disabling I recorded my remote ...
1
vote
1answer
464 views

Error when installing Flexget

Having some problems trying to install flexget. I get the following error when I run the command: pi@rpi:~$ sudo pip install flexget Requirement already satisfied (use --upgrade to upgrade): ...
1
vote
0answers
379 views

Webcam doesn't work on Raspberry Pi VIDIOC-QUERYMENU: Invalid Argument

So I wrote an image processing program in Python on my windows computer and it works fine there, but when I try to run it on the Raspberry Pi I get VIDIOC-QUERYMENU: Invalid Argument a bunch of times. ...
1
vote
0answers
1k views

Python attribute error with Raspberry Pi Camera

I have been coding a python 3 program which allows a user to easily take pictures with the raspberry pi camera. The program works up to the Camera_Capture method which takes the picture. When it is ...
1
vote
0answers
750 views

Midori change URL without new tab

I am trying to change the url of the midori browser after predefined intervals. import os import subprocess import time cmdline = ["midori", "-e", "Fullscreen", "-a","http://www.foo.bar"] p = ...
1
vote
0answers
2k views

Raspberry Pi stream video over RF

I would like to stream video from a Raspberry Pi over RF to another Raspberry Pi. Here are a few requirements: Range of at least 1KM (pretty much line of sight) I would also like to send some data ...
1
vote
0answers
649 views

pymodbus to read temp from device

I am trying to us pymodbus to read data from a temperature and pressure device, but it seems the output from my readings is always None. Here is my code import pymodbus import serial from pymodbus....
1
vote
0answers
534 views

Python serial script prevents android connection

The python script below connects via "rfcomm0" to the "Bluefruit EZ-link module" on the "Arduino Uno" but prevents the bluetooth connection from my android app. If I change the script to use "/dev/...
1
vote
0answers
452 views

controlling 12 V RGB LED strip with raspberry pi

We are trying to control a RGB led strip with a 12 V power supply. The servoblaster does not work. Can you please suggest some other software we can use?
1
vote
0answers
473 views

LIRC with Raspberry PI , problems

I am trying to get my SONY CRS60A IR remote to work with LIRC and raspberry pi 2. Here is the setup : That is what my setup looks like. When I run mode2 -d /dev/lirc0 , I am able to read the pulses. ...
1
vote
0answers
368 views

I2C PIC18F2520 and PI

I am having a big problem to communicate a PI with PIC using I2C. When I try to use another PIC as master everything works fine, no problem. But swtich to PI I cant get it to work. To start my both ...
1
vote
0answers
740 views

Reset Pi Noir Camera

I have developed a system (Raspbian / Python) with detects someone's presence through a PIR sensor and records a 15' video with a Pi NoIR camera. This is command I call to record the video: Popen(["...
1
vote
0answers
1k views

Getting a Runtime warning and a Traceback warning

First of all let me introduce the problem. I am busy working on a HC SR04 + servo combination to measure the distance in certain angles. But lately some weird errors are coming up. The script( which i ...
1
vote
0answers
418 views

PySerial not responding after 10 seconds of inactivity

I've got the JY-MCU Bluetooth module connected to the hardware serial port on my Raspberry Pi. It seems to be working except for one thing: when there is no communication for about 10 seconds or more, ...
1
vote
0answers
117 views

GPIO problems, when run infinitely goes to the right

I'm trying to get a controller to move right, preferably one space, using GPIO. I'm not quite sure what I'm doing wrong but whenever I run the script it moves to the right but it never stops. I don't ...
1
vote
0answers
681 views

Send SMS using Pi

I have a project, and I would like to send SMS message from Pi to my number phone, when I run it the command says: cannot send message: Process exited with a non-zero status I used SMS gateways to ...
1
vote
0answers
526 views

Determining position with motion detection - Camera Module

I currently am working on an art project that requires to know the position of a person within 3 columns. I have figured that I can achieve this result by motion detection by comparing one frame to ...

1
4 5
6
7 8
14